Esempio n. 1
0
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../../test.application.config.php');
     parent::setUp();
     $this->documentManager = $this->getApplicationServiceLocator()->get('doctrine.odm.documentmanager.default');
     $this->documentManager->getConnection()->selectDatabase(TestData::DB);
     if (!static::$dbDataCreated) {
         //Create data in the db to query against
         static::$staticDcumentManager = $this->documentManager;
         TestData::create($this->documentManager);
         static::$dbDataCreated = true;
     }
 }
 public function createAction()
 {
     TestData::create($this->serviceLocator->get('doctrine.odm.documentmanager.default'));
     return;
 }