コード例 #1
0
 protected function setUp()
 {
     parent::setup();
     $this->tripod = new \Tripod\Mongo\Driver('CBD_testing', 'tripod_php_testing');
     $this->getTripodCollection($this->tripod)->drop();
     $this->loadResourceDataViaTripod();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
 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();
 }
コード例 #4
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);
 }
コード例 #5
0
 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;
 }
コード例 #6
0
 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();
     }
 }
コード例 #7
0
 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.
     /** @var \Tripod\Mongo\Driver|PHPUnit_Framework_MockObject_MockObject $this->tripod */
     $this->tripod = $this->getMock('\\Tripod\\Mongo\\Driver', array('addToSearchIndexQueue'), array('CBD_testing', 'tripod_php_testing', array("defaultContext" => "http://talisaspire.com/", "async" => array(OP_VIEWS => true))));
     $this->tripod->expects($this->any())->method('addToSearchIndexQueue');
     $this->getTripodCollection($this->tripod)->drop();
     $this->tripod->setTransactionLog($this->tripodTransactionLog);
     $this->tripodViews = new \Tripod\Mongo\Composites\Views($this->tripod->getStoreName(), $this->getTripodCollection($this->tripod), 'http://talisaspire.com/');
     foreach (\Tripod\Mongo\Config::getInstance()->getCollectionsForViews($this->tripod->getStoreName()) as $collection) {
         $collection->drop();
     }
     $this->viewsConstParams = array($this->tripod->getStoreName(), $this->getTripodCollection($this->tripod), 'http://talisaspire.com/');
     // load base data
     $this->loadResourceDataViaTripod();
 }
コード例 #8
0
 protected function setUp()
 {
     parent::setup();
 }
コード例 #9
0
 protected function setUp()
 {
     parent::setup();
     $this->tripodConfig = \Tripod\Mongo\Config::getInstance();
 }