/** * @test * @group manager */ public function testAddThemeLocationPreventDoubles() { $addPath = themes_base_path() . '/../themes-test'; $this->assertFalse($this->themeManager->themes()->pathExists($addPath)); $this->themeManager->addThemeLocation($addPath); $this->assertTrue($this->themeManager->themes()->pathExists($addPath)); $this->themeManager->addThemeLocation($addPath); $this->assertEquals(3, $this->themeManager->getInvalidThemesCount()); $this->assertEquals(3, $this->themeManager->countAll()); }
/** * @test * @group manager */ public function testAddThemeLocation() { //Path that has one theme $path = themes_base_path() . '/../themes-alternative'; //returns $this $this->assertInstanceOf('ThemeManager\\ThemeManager', $this->themeManager->addThemeLocation($path)); //Make sure it exists $this->assertTrue($this->themeManager->themeExists('example-theme')); $this->assertInstanceOf('ThemeManager\\Theme', $this->themeManager->getTheme('example-theme')); //example-theme is a Secondary Theme $this->assertEquals('Secondary', $this->themeManager->getTheme('example-theme')->getLocationType()); //There should now be four themes $this->assertEquals(4, $this->themeManager->countAll()); }