public function setUp()
 {
     $this->sm = Bootstrap::getServiceManager();
     $this->em = $this->sm->get('doctrine.entitymanager.orm_default');
     $tool = new \Doctrine\ORM\Tools\SchemaTool($this->em);
     $classes = $this->em->getMetadataFactory()->getAllMetadata();
     $tool->dropSchema($classes);
     $tool->createSchema($classes);
     parent::setUp();
 }
示例#2
0
 public function setUp()
 {
     parent::setUp();
     $this->sm = Bootstrap::getServiceManager();
     $this->em = $this->sm->get('doctrine.entitymanager.orm_default');
     $cronData1 = new Cronjob();
     $cronData1->setCode('TestCode1');
     $cronData1->setStatus('pending');
     $cronData1->setCreateTime(new \DateTime('2013-11-4'));
     $cronData1->setScheduleTime(new \DateTime('2013-11-4'));
     $cronData2 = new Cronjob();
     $cronData2->setCode('TestCode2');
     $cronData2->setStatus('pending');
     $cronData2->setCreateTime(new \DateTime('2013-11-5'));
     $cronData2->setScheduleTime(new \DateTime('2013-11-5'));
     $this->cronData[] = $cronData1;
     $this->cronData[] = $cronData2;
 }
 public function setUp()
 {
     parent::setUp();
     $this->sm = Bootstrap::getServiceManager();
 }
 public function testGetOptions()
 {
     $service = new \PlaygroundCore\Service\Formgen();
     $service->setServiceManager(Bootstrap::getServiceManager());
     $this->assertEquals(get_class($service->getOptions()), "PlaygroundCore\\Options\\ModuleOptions");
 }