/**
  * @param string $directory
  *
  * @return Theme
  */
 private function getThemeInfoForPath($directory)
 {
     $themeJson = new Json($directory);
     $theme = new Theme($themeJson->getJsonAttribute('name'), $themeJson->getJsonAttribute('description'), $directory, $themeJson->getJsonAttribute('parent'));
     $theme->version = $themeJson->getJsonAttribute('version');
     $theme->type = ucfirst($themeJson->getJsonAttribute('type'));
     $theme->changelog = $this->getChangelog($directory);
     $theme->active = $this->getStatus($theme);
     return $theme;
 }
Example #2
0
 /**
  * @expectedException FloatingPoint\Stylist\Theme\Exceptions\ThemeJsonNotFoundException
  */
 public function testThemeFileMissing()
 {
     $json = new Json('path/that/doesnt/exist');
     $json->getJson();
 }