예제 #1
0
 protected function setUp()
 {
     $this->initAutoload();
     $this->bbapp = $this->getBBApp();
     $this->initDb($this->bbapp);
     $this->initAcl();
     $this->bbapp->start();
     // craete site
     $this->site = new Site();
     $this->site->setLabel('sitelabel');
     $this->site->setServerName('www.example.org');
     // craete layout
     $this->layout = new Layout();
     $this->layout->setSite($this->site);
     $this->layout->setLabel('defaultLayoutLabel');
     $this->layout->setPath($this->bbapp->getBBDir() . '/Rest/Tests/Fixtures/Controller/defaultLayout.html.twig');
     $this->layout->setData(json_encode(array('templateLayouts' => array('title' => 'zone_1234567'))));
     $this->site->addLayout($this->layout);
     $this->getEntityManager()->persist($this->layout);
     $this->getEntityManager()->persist($this->site);
     $this->getEntityManager()->flush();
 }