public function testBuildSite()
 {
     $folders = array('RedKiteCMS' => array('app' => array('cache' => array(), 'config' => array(), 'data' => array('redkitecms.com' => array('config' => array(), 'pages' => array('pages' => array()), 'roles' => array(), 'slots' => array(), 'users' => array())), 'logs' => array(), 'plugins' => array('RedKiteCms' => array('Block' => array(), 'Theme' => array())), 'RedKiteCms.php' => 'class RedKiteCms extends RedKiteCmsBase{}'), 'src' => array(), 'web' => array()));
     vfsStream::setup('www', null, $folders);
     $siteBuilder = new SiteBuilder(vfsStream::url('www/RedKiteCMS'), 'redkitecms.com');
     $siteBuilder->build();
     $structure = vfsStream::inspect(new \org\bovigo\vfs\visitor\vfsStreamStructureVisitor())->getStructure();
     $siteStructure = array("redkitecms.com" => array("config" => array(), "pages" => array("pages" => array()), "roles" => array("roles.json" => '["ROLE_ADMIN"]'), "slots" => array(), "users" => array("users.json" => '{"admin":{"roles":["ROLE_ADMIN"],"password":"******","salt":"q4mfgrnsn2occ4kw4k008cskkwkg800"}}'), "RedKiteCms.php" => 'class RedKiteCms extends RedKiteCmsBase{}', "site.json" => '{"theme":"SimpleTheme","homepage":"homepage","locale_default":"en_GB","homepage_permalink":"en-gb-homepage","languages":["en_GB"],"handled_theme":""}', "incomplete.json" => null));
     $this->assertEquals($siteStructure, $structure["www"]["RedKiteCMS"]["app"]["data"]);
 }
 private function initCmsRequiredServices()
 {
     $configurationOptions = $this->configure();
     $this->app["red_kite_cms.configuration_handler"] = new ConfigurationHandler($this->app["red_kite_cms.root_dir"], $this->siteName);
     $this->app["red_kite_cms.configuration_handler"]->setConfigurationOptions($configurationOptions);
     $siteNameDir = $this->app["red_kite_cms.root_dir"] . '/app/data/' . $this->siteName;
     if (!is_dir($siteNameDir)) {
         $siteBuilder = new SiteBuilder($this->app["red_kite_cms.root_dir"], $this->siteName);
         $siteBuilder->build();
     }
     $this->app["red_kite_cms.configuration_handler"]->boot();
     $this->frameworkAbsoluteDir = $this->app["red_kite_cms.configuration_handler"]->frameworkAbsoluteDir();
 }