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(); }
protected function setUp() { parent::setup(); $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('validateGraphCardinality'), array('CBD_testing', 'tripod_php_testing', array('defaultContext' => 'http://talisaspire.com/'))); $this->tripod->expects($this->any())->method('addToSearchIndexQueue'); $this->getTripodCollection($this->tripod)->drop(); // Lock collection no longer available from Tripod, so drop it manually \Tripod\Mongo\Config::getInstance()->getCollectionForLocks($this->tripod->getStoreName())->drop(); $this->tripod->setTransactionLog($this->tripodTransactionLog); $this->loadResourceDataViaTripod(); }
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); }
protected function setUp() { parent::setup(); $this->tripodTransactionLog = new \Tripod\Mongo\TransactionLog(); $this->tripodTransactionLog->purgeAllTransactions(); $this->labeller = new \Tripod\Mongo\Labeller(); // Stub out 'addToElastic' search to prevent writes into Elastic Search happening by default. $tripod = $this->getMock('\\Tripod\\Mongo\\Driver', array('addToSearchIndexQueue'), array('CBD_testing', 'tripod_php_testing', array('defaultContext' => 'http://talisaspire.com/'))); $tripod->expects($this->any())->method('addToSearchIndexQueue'); /** @var $tripod \Tripod\Mongo\Driver */ \Tripod\Mongo\Config::getInstance()->getCollectionForCBD('tripod_php_testing', 'CBD_testing')->drop(); // Lock collection no longer available from Driver, so drop it manually \Tripod\Mongo\Config::getInstance()->getCollectionForLocks('tripod_php_testing')->drop(); $tripod->setTransactionLog($this->tripodTransactionLog); $this->tripod = $tripod; }