From 41df17bc464832118a767ceff6c9217071699783 Mon Sep 17 00:00:00 2001 From: Dag Date: Sun, 1 Oct 2023 19:23:30 +0200 Subject: refactor (#3712) * test: refactor test suite * docs * refactor * yup * docs --- tests/CacheImplementationTest.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/CacheImplementationTest.php (limited to 'tests/CacheImplementationTest.php') diff --git a/tests/CacheImplementationTest.php b/tests/CacheImplementationTest.php new file mode 100644 index 00000000..e6ed352b --- /dev/null +++ b/tests/CacheImplementationTest.php @@ -0,0 +1,36 @@ +assertTrue($path === ucfirst($path), 'class name must start with uppercase character'); + $this->assertEquals(0, substr_count($path, ' '), 'class name must not contain spaces'); + $this->assertStringEndsWith('Cache', $path, 'class name must end with "Cache"'); + } + + /** + * @dataProvider getCacheClassNames + */ + public function testClassType($path) + { + $this->assertTrue(is_subclass_of($path, CacheInterface::class), 'class must be subclass of CacheInterface'); + } +} -- cgit v1.2.3