public function setup() { parent::setup(); $this->serviceManager->setAllowOverride(true); $this->configuration = $this->serviceManager->get('Configuration'); $this->connectionFactory = new ConnectionFactory('odm_default'); }
public function setup() { parent::setup(); $this->numberOfItems = 20; $documentManager = $this->getDocumentManager(); for ($i = 1; $i <= $this->numberOfItems; $i++) { $document = new Simple(); $document->setName(sprintf('Document %02d', $i)); $documentManager->persist($document); } $documentManager->flush(); }