protected function setUp()
 {
     parent::setup();
     //Mongo::setPoolSize(200);
     $this->tripodTransactionLog = new \Tripod\Mongo\TransactionLog();
     $this->tripodTransactionLog->purgeAllTransactions();
     // Stub ouf 'addToElastic' search to prevent writes into Elastic Search happening by default.
     $this->tripod = $this->getMock('\\Tripod\\Mongo\\Driver', array('addToSearchIndexQueue'), array('CBD_testing', 'tripod_php_testing', array('defaultContext' => 'http://talisaspire.com/')));
     $this->tripod->expects($this->any())->method('addToSearchIndexQueue');
     $this->getTripodCollection($this->tripod)->drop();
     $this->tripod->setTransactionLog($this->tripodTransactionLog);
     $this->loadResourceDataViaTripod();
 }
Exemplo n.º 2
0
 protected function setUp()
 {
     parent::setup();
     // Stub ouf 'addToElastic' search to prevent writes into Elastic Search happening by default.
     /** @var \Tripod\Mongo\Driver|PHPUnit_Framework_MockObject_MockObject $tripod */
     $this->tripod = $this->getMock('\\Tripod\\Mongo\\Driver', array('addToSearchIndexQueue'), array('CBD_testing', 'tripod_php_testing'));
     $this->tripod->expects($this->any())->method('addToSearchIndexQueue');
     $this->getTripodCollection($this->tripod)->drop();
     // Lock collection no longer available from Driver, so drop it manually
     \Tripod\Mongo\Config::getInstance()->getCollectionForLocks($this->tripod->getStoreName())->drop();
     $this->loadResourceDataViaTripod();
     $this->tripodTransactionLog = new \Tripod\Mongo\TransactionLog();
     $this->tripodTransactionLog->purgeAllTransactions();
     $this->tripod->setTransactionLog($this->tripodTransactionLog);
 }