Esempio n. 1
0
 protected function classSetUp()
 {
     parent::classSetUp();
     $this->connection = new Connection($this->server, $this->dbName);
     $this->mongator = new Mongator(new $this->metadataClass());
     $this->mongator->setConnection('default', $this->connection);
     $this->mongator->setDefaultConnectionName('default');
     $this->mongator->setFieldsCache(new ArrayCache());
     $this->mongator->setDataCache(new ArrayCache());
     foreach ($this->mongator->getAllRepositories() as $repository) {
         $repository->getIdentityMap()->clear();
     }
     foreach ($this->connection->getMongoDB()->listCollections() as $collection) {
         $collection->deleteIndexes();
         $collection->drop();
     }
 }
Esempio n. 2
0
 protected function classSetUp()
 {
     parent::classSetUp();
     $this->getTestDB()->drop();
 }
 protected function classSetUp()
 {
     parent::classSetUp();
     self::$htmlString = file_get_contents(__DIR__ . '/data/html.html');
 }