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')); } }