protected function setUp() { parent::setUp(); $validatorFactory = $this->testEnvironment->getUtilityFactory()->newValidatorFactory(); $stringValidator = $validatorFactory->newStringValidator(); $semanticDataValidator = $validatorFactory->newSemanticDataValidator(); $queryResultValidator = $validatorFactory->newQueryResultValidator(); $this->queryTestCaseProcessor = new QueryTestCaseProcessor($this->getStore(), $queryResultValidator, $stringValidator); $this->rdfTestCaseProcessor = new RdfTestCaseProcessor($this->getStore(), $stringValidator); $this->parserTestCaseProcessor = new ParserTestCaseProcessor($this->getStore(), $semanticDataValidator, $stringValidator); $this->specialPageTestCaseProcessor = new SpecialPageTestCaseProcessor($this->getStore(), $stringValidator); $this->eventDispatcher = EventHandler::getInstance()->getEventDispatcher(); // This ensures that if content is created in the NS_MEDIAWIKI namespace // and an object relies on the MediaWikiNsContentReader then it uses the DB ApplicationFactory::getInstance()->getMediaWikiNsContentReader()->skipMessageCache(); DataValueFactory::getInstance()->clear(); // Reset the Title/TitleParser otherwise a singleton instance holds an outdated // content language reference $this->testEnvironment->resetMediaWikiService('_MediaWikiTitleCodec'); $this->testEnvironment->resetMediaWikiService('TitleParser'); $this->testEnvironment->resetPoolCacheFor(PropertySpecificationLookup::POOLCACHE_ID); // Make sure LocalSettings don't interfere with the default settings $GLOBALS['smwgDVFeatures'] = $GLOBALS['smwgDVFeatures'] & ~SMW_DV_NUMV_USPACE; $this->testEnvironment->addConfiguration('smwgQueryResultCacheType', false); }
protected function setUp() { parent::setUp(); $validatorFactory = UtilityFactory::getInstance()->newValidatorFactory(); $stringValidator = $validatorFactory->newStringValidator(); $semanticDataValidator = $validatorFactory->newSemanticDataValidator(); $queryResultValidator = $validatorFactory->newQueryResultValidator(); $this->queryTestCaseProcessor = new QueryTestCaseProcessor($this->getStore(), $queryResultValidator, $stringValidator); $this->rdfTestCaseProcessor = new RdfTestCaseProcessor($this->getStore(), $stringValidator); $this->parserTestCaseProcessor = new ParserTestCaseProcessor($this->getStore(), $semanticDataValidator, $stringValidator); $this->eventDispatcher = EventHandler::getInstance()->getEventDispatcher(); }
protected function setUp() { parent::setUp(); $this->stringValidator = UtilityFactory::getInstance()->newValidatorFactory()->newStringValidator(); }
protected function setUp() { parent::setUp(); $this->queryTestCaseProcessor = new QueryTestCaseProcessor($this->getStore(), ApplicationFactory::getInstance()->newQueryParser(), UtilityFactory::getInstance()->newValidatorFactory()->newQueryResultValidator(), UtilityFactory::getInstance()->newValidatorFactory()->newStringValidator()); }