示例#1
0
 /**
  * @test
  * @group library
  */
 public function test_buildTheme_removedThemeFilesIfNoValuesGiven()
 {
     // ARRANGE
     $cliBusiness = $this->getCliBusiness();
     // ACT
     // 1. check if theme folder is empty
     $themeFolderEmpty = DirectoryHelper::getRecursive($this->getTestTargetPath());
     $this->assertArrayNotHasKey('children', $themeFolderEmpty);
     // 2. create theme files
     $cliBusiness->buildTheme(array('color' => '#091929', 'logo' => 'http://localhost/this/is/the/url/of/the/logo.svg'));
     $themeFolder = DirectoryHelper::getRecursive($this->getTestTargetPath());
     $this->assertArrayHasKey('children', $themeFolder);
     $this->assertGreaterThan(0, $themeFolder['children']);
     // 3. reset theme
     $cliBusiness->buildTheme(array());
     $resetThemeFolder = DirectoryHelper::getRecursive($this->getTestTargetPath());
     // ASSERT
     $this->assertArrayNotHasKey('children', $resetThemeFolder);
 }
示例#2
0
 /**
  * @param string $directory
  */
 protected function assertDirectoryIsEmpty($directory)
 {
     $actualDirectoryTree = DirectoryHelper::getRecursive($directory);
     $this->assertEquals(array(), $actualDirectoryTree);
 }