protected function setUp()
 {
     parent::setUp();
     $this->tripodTransactionLog = new \Tripod\Mongo\TransactionLog();
     $this->tripodTransactionLog->purgeAllTransactions();
     $this->tripod = new \Tripod\Mongo\Driver('CBD_testing', 'tripod_php_testing');
     $this->indexer = new \Tripod\Mongo\Composites\SearchIndexer($this->tripod);
     $this->searchProvider = new \Tripod\Mongo\MongoSearchProvider($this->tripod);
     $this->getTripodCollection($this->tripod)->drop();
     $this->loadBaseSearchDataViaTripod();
     foreach (\Tripod\Mongo\Config::getInstance()->getCollectionsForSearch($this->tripod->getStoreName()) as $collection) {
         $collection->drop();
     }
     // index all the documents
     $cursor = $this->getTripodCollection($this->tripod)->find(array("rdf:type.u" => array('$in' => array("bibo:Book"))), array('_id' => 1, 'rdf:type' => 1));
     //->limit(20);
     foreach ($cursor as $result) {
         $t = array();
         if (isset($result['rdf:type']['u'])) {
             $t[] = $result['rdf:type']['u'];
         } else {
             foreach ($result['rdf:type'] as $_t) {
                 $t[] = $_t['u'];
             }
         }
         $this->indexer->generateAndIndexSearchDocuments($result['_id']['r'], $result['_id']['c'], $this->tripod->getPodName());
     }
 }
 protected function setUp()
 {
     parent::setup();
     $this->tripod = new \Tripod\Mongo\Driver('CBD_testing', 'tripod_php_testing');
     $this->getTripodCollection($this->tripod)->drop();
     $this->loadResourceDataViaTripod();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->tripod = new \Tripod\Mongo\Driver("CBD_testing", "tripod_php_testing", array("async" => array(OP_VIEWS => true, OP_TABLES => true, OP_SEARCH => false)));
     foreach (\Tripod\Mongo\Config::getInstance()->getCollectionsForSearch($this->tripod->getStoreName()) as $collection) {
         $collection->drop();
     }
     $this->loadResourceDataViaTripod();
     $this->loadBaseSearchDataViaTripod();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->tripod = new \Tripod\Mongo\Driver('CBD_testing', 'tripod_php_testing');
     $this->getTripodCollection($this->tripod)->drop();
     $this->loadBaseSearchDataViaTripod();
     foreach (\Tripod\Mongo\Config::getInstance()->getCollectionsForSearch($this->tripod->getStoreName()) as $collection) {
         $collection->drop();
     }
 }
 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;
 }
 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();
     }
 }
 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();
 }
 protected function setUp()
 {
     parent::setup();
 }
 public function tearDown()
 {
     \Tripod\Mongo\Config::setConfig($this->originalConfig);
     \Tripod\Mongo\Config::setValidationLevel(\Tripod\Mongo\Config::VALIDATE_MIN);
     parent::tearDown();
 }
 protected function setUp()
 {
     parent::setup();
     $this->tripodConfig = \Tripod\Mongo\Config::getInstance();
 }