From 8c0f19c7971e1a4534347ce9d6d82a0a45799711 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Mon, 3 Dec 2018 00:46:04 +0100 Subject: namespacing: \Shaarli\Render\{PageBuilder,ThemeUtils} Signed-off-by: VirtualTam --- tests/ThemeUtilsTest.php | 55 ----------------------------------------- tests/render/ThemeUtilsTest.php | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 tests/ThemeUtilsTest.php create mode 100644 tests/render/ThemeUtilsTest.php (limited to 'tests') diff --git a/tests/ThemeUtilsTest.php b/tests/ThemeUtilsTest.php deleted file mode 100644 index e44564be..00000000 --- a/tests/ThemeUtilsTest.php +++ /dev/null @@ -1,55 +0,0 @@ -assertTrue(in_array($theme, $themes)); - } - $this->assertFalse(in_array('supertheme', $res)); - - foreach ($themes as $theme) { - rmdir('sandbox/tpl/'. $theme); - } - unlink('sandbox/tpl/supertheme'); - rmdir('sandbox/tpl'); - } - - /** - * Test getThemes() without any theme dir. - */ - public function testGetThemesEmpty() - { - mkdir('sandbox/tpl/', 0755, true); - $this->assertEquals([], ThemeUtils::getThemes('sandbox/tpl/')); - rmdir('sandbox/tpl/'); - } - - /** - * Test getThemes() with an invalid path. - */ - public function testGetThemesInvalid() - { - $this->assertEquals([], ThemeUtils::getThemes('nope')); - } -} diff --git a/tests/render/ThemeUtilsTest.php b/tests/render/ThemeUtilsTest.php new file mode 100644 index 00000000..6159a1bd --- /dev/null +++ b/tests/render/ThemeUtilsTest.php @@ -0,0 +1,55 @@ +assertTrue(in_array($theme, $themes)); + } + $this->assertFalse(in_array('supertheme', $res)); + + foreach ($themes as $theme) { + rmdir('sandbox/tpl/'. $theme); + } + unlink('sandbox/tpl/supertheme'); + rmdir('sandbox/tpl'); + } + + /** + * Test getThemes() without any theme dir. + */ + public function testGetThemesEmpty() + { + mkdir('sandbox/tpl/', 0755, true); + $this->assertEquals([], ThemeUtils::getThemes('sandbox/tpl/')); + rmdir('sandbox/tpl/'); + } + + /** + * Test getThemes() with an invalid path. + */ + public function testGetThemesInvalid() + { + $this->assertEquals([], ThemeUtils::getThemes('nope')); + } +} -- cgit v1.2.3