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(); // 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->tripod = new \Tripod\Mongo\Driver($this->defaultPodName, $this->defaultStoreName, array("async" => array(OP_VIEWS => false, OP_TABLES => false, OP_SEARCH => false))); $this->getTripodCollection($this->tripod)->drop(); $this->tripod->setTransactionLog($this->tripodTransactionLog); $this->loadResourceDataViaTripod(); $this->tablesConstParams = array($this->tripod->getStoreName(), $this->getTripodCollection($this->tripod), 'http://talisaspire.com/'); $this->tripodTables = new \Tripod\Mongo\Composites\Tables($this->tripod->getStoreName(), $this->getTripodCollection($this->tripod), null); // pass null context, should default to http://talisaspire.com // purge tables foreach (\Tripod\Mongo\Config::getInstance()->getCollectionsForTables($this->tripod->getStoreName()) as $collection) { $collection->drop(); } }