コード例 #1
0
ファイル: ConnectionFactoryTest.php プロジェクト: im286er/ent
 public function setup()
 {
     parent::setup();
     $this->serviceManager->setAllowOverride(true);
     $this->configuration = $this->serviceManager->get('Configuration');
     $this->connectionFactory = new ConnectionFactory('odm_default');
 }
コード例 #2
0
 public function setUp()
 {
     parent::setUp();
     $documentManager = $this->getDocumentManager();
     for ($i = 1; $i <= 20; $i++) {
         $document = new Simple();
         $document->setName("Document {$i}");
         $documentManager->persist($document);
     }
     $documentManager->flush();
 }
コード例 #3
0
 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();
 }
コード例 #4
0
ファイル: Bootstrap.php プロジェクト: im286er/ent
<?php

$applicationRoot = __DIR__ . '/../../../../';
chdir($applicationRoot);
$loader = (require_once 'vendor/autoload.php');
$loader->add('DoctrineMongoODMModuleTest', __DIR__);
$config = (include __DIR__ . '/test.application.config.php');
\DoctrineMongoODMModuleTest\Doctrine\Util\ServiceManagerFactory::setConfig($config);
\DoctrineMongoODMModuleTest\AbstractTest::setApplicationConfig($config);