當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MwDBaseUnitTestCase::setUp方法代碼示例

本文整理匯總了PHP中SMW\Tests\MwDBaseUnitTestCase::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP MwDBaseUnitTestCase::setUp方法的具體用法?PHP MwDBaseUnitTestCase::setUp怎麽用?PHP MwDBaseUnitTestCase::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SMW\Tests\MwDBaseUnitTestCase的用法示例。


在下文中一共展示了MwDBaseUnitTestCase::setUp方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->messageReporterFactory = MessageReporterFactory::getInstance();
     $this->tableBuilder = TableBuilder::factory($this->getStore()->getConnection(DB_MASTER));
     $this->stringValidator = $this->testEnvironment->getUtilityFactory()->newValidatorFactory()->newStringValidator();
 }
開發者ID:jongfeli,項目名稱:SemanticMediaWiki,代碼行數:7,代碼來源:TableBuilderIntegrationTest.php

示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->testEnvironment->addConfiguration('smwgEnabledDeferredUpdate', false);
     $this->pageCreator = UtilityFactory::getInstance()->newPageCreator();
     $this->semanticDataValidator = UtilityFactory::getInstance()->newValidatorFactory()->newSemanticDataValidator();
 }
開發者ID:jongfeli,項目名稱:SemanticMediaWiki,代碼行數:7,代碼來源:RedirectTargetFinderIntegrationTest.php

示例3: setUp

 protected function setUp()
 {
     parent::setUp();
     // Variable set using phpunit.xml
     if (isset($GLOBALS['benchmarkQueryRepetitionExecutionThreshold'])) {
         $this->repetitionExecutionThreshold = $GLOBALS['benchmarkQueryRepetitionExecutionThreshold'];
     }
     if (isset($GLOBALS['benchmarkPageCopyThreshold'])) {
         $this->pageCopyThreshold = $GLOBALS['benchmarkPageCopyThreshold'];
     }
     if (isset($GLOBALS['benchmarkShowMemoryUsage'])) {
         $this->showMemoryUsage = (bool) $GLOBALS['benchmarkShowMemoryUsage'];
     }
     if (isset($GLOBALS['benchmarkQueryLimit'])) {
         $this->queryLimit = $GLOBALS['benchmarkQueryLimit'];
     }
     if (isset($GLOBALS['benchmarkQueryOffset'])) {
         $this->queryOffset = $GLOBALS['benchmarkQueryOffset'];
     }
     if (isset($GLOBALS['benchmarkReuseDatasets'])) {
         $this->reuseDatasets = $GLOBALS['benchmarkReuseDatasets'];
     }
     $this->queryParser = new QueryParser();
     $this->benchmarkRunner = new BenchmarkRunner();
 }
開發者ID:jongfeli,項目名稱:SemanticMediaWiki,代碼行數:25,代碼來源:QueryEngineBenchmark.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->semanticDataFactory = UtilityFactory::getInstance()->newSemanticDataFactory();
     $this->mwHooksHandler = UtilityFactory::getInstance()->newMwHooksHandler();
     $this->mwHooksHandler->deregisterListedHooks();
 }
開發者ID:WolfgangFahl,項目名稱:SemanticMediaWiki,代碼行數:7,代碼來源:SemanticDataSortKeyUpdateDBIntegrationTest.php

示例5: setUp

 protected function setUp()
 {
     parent::setUp();
     $utilityFactory = UtilityFactory::getInstance();
     $this->fixturesFileProvider = $utilityFactory->newFixturesFactory()->newFixturesFileProvider();
     $this->semanticDataValidator = $utilityFactory->newValidatorFactory()->newSemanticDataValidator();
     $this->pageEditor = $utilityFactory->newPageEditor();
     $this->mwHooksHandler = $utilityFactory->newMwHooksHandler();
     $this->mwHooksHandler->deregisterListedHooks();
     $this->applicationFactory = ApplicationFactory::getInstance();
     $settings = array('smwgPageSpecialProperties' => array('_MEDIA', '_MIME'), 'smwgNamespacesWithSemanticLinks' => array(NS_MAIN => true, NS_FILE => true), 'smwgCacheType' => 'hash');
     foreach ($settings as $key => $value) {
         $this->applicationFactory->getSettings()->set($key, $value);
     }
     //	$this->getStore()->clear();
     //	$this->getStore()->setupStore( false );
     $this->wgEnableUploads = $GLOBALS['wgEnableUploads'];
     $this->wgFileExtensions = $GLOBALS['wgFileExtensions'];
     $this->wgVerifyMimeType = $GLOBALS['wgVerifyMimeType'];
     $this->mwHooksHandler->register('FileUpload', $this->mwHooksHandler->getHookRegistry()->getHandlerFor('FileUpload'));
     $this->mwHooksHandler->register('InternalParseBeforeLinks', $this->mwHooksHandler->getHookRegistry()->getHandlerFor('InternalParseBeforeLinks'));
     $this->mwHooksHandler->register('LinksUpdateConstructed', $this->mwHooksHandler->getHookRegistry()->getHandlerFor('LinksUpdateConstructed'));
     $GLOBALS['wgEnableUploads'] = true;
     $GLOBALS['wgFileExtensions'] = array('txt');
     $GLOBALS['wgVerifyMimeType'] = true;
 }
開發者ID:WolfgangFahl,項目名稱:SemanticMediaWiki,代碼行數:26,代碼來源:FileUploadIntegrationTest.php

示例6: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->dataValueFactory = DataValueFactory::getInstance();
     $this->queryResultValidator = UtilityFactory::getInstance()->newValidatorFactory()->newQueryResultValidator();
     $this->semanticDataFactory = UtilityFactory::getInstance()->newSemanticDataFactory();
 }
開發者ID:WolfgangFahl,項目名稱:SemanticMediaWiki,代碼行數:7,代碼來源:CategoryClassQueryDBIntegrationTest.php

示例7: setUp

 protected function setUp()
 {
     parent::setUp();
     $utilityFactory = UtilityFactory::getInstance();
     $this->fileReader = $utilityFactory->newJsonFileReader(null);
     $this->pageCreator = $utilityFactory->newPageCreator();
 }
開發者ID:brandonphuong,項目名稱:mediawiki,代碼行數:7,代碼來源:ByJsonTestCaseProvider.php

示例8: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->mwHooksHandler = new MwHooksHandler();
     $this->pageDeleter = new PageDeleter();
     $this->pageCreator = new PageCreator();
 }
開發者ID:jongfeli,項目名稱:SemanticMediaWiki,代碼行數:7,代碼來源:RefreshSQLStoreDBIntegrationTest.php

示例9: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->semanticDataFactory = UtilityFactory::getInstance()->newSemanticDataFactory();
     $this->queryResultValidator = UtilityFactory::getInstance()->newValidatorFactory()->newQueryResultValidator();
     $this->fixturesProvider = UtilityFactory::getInstance()->newFixturesFactory()->newFixturesProvider();
     $this->fixturesProvider->setupDependencies($this->getStore());
 }
開發者ID:WolfgangFahl,項目名稱:SemanticMediaWiki,代碼行數:8,代碼來源:NamespaceQueryDBIntegrationTest.php

示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $utilityFactory = UtilityFactory::getInstance();
     $this->pageCreator = $utilityFactory->newPageCreator();
     $this->stringBuilder = $utilityFactory->newStringBuilder();
     $this->stringValidator = $utilityFactory->newValidatorFactory()->newStringValidator();
 }
開發者ID:WolfgangFahl,項目名稱:SemanticMediaWiki,代碼行數:8,代碼來源:QueryResultPrinterIntegrationTest.php

示例11: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->queryResultValidator = UtilityFactory::getInstance()->newValidatorFactory()->newQueryResultValidator();
     $this->semanticDataFactory = UtilityFactory::getInstance()->newSemanticDataFactory();
     $this->queryParser = new QueryParser();
     //	$this->getStore()->getSparqlDatabase()->deleteAll();
 }
開發者ID:WolfgangFahl,項目名稱:SemanticMediaWiki,代碼行數:8,代碼來源:DisjunctionQueryDBIntegrationTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->dataValueFactory = DataValueFactory::getInstance();
     $this->queryResultValidator = UtilityFactory::getInstance()->newValidatorFactory()->newQueryResultValidator();
     $this->semanticDataFactory = UtilityFactory::getInstance()->newSemanticDataFactory();
     $this->testEnvironment->addConfiguration('smwgQueryResultCacheType', false);
 }
開發者ID:jongfeli,項目名稱:SemanticMediaWiki,代碼行數:8,代碼來源:GeneralQueryDBIntegrationTest.php

示例13: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->apiFactory = new MwApiFactory();
     $this->dataValueFactory = DataValueFactory::getInstance();
     $this->serializerFactory = new SerializerFactory();
     $this->semanticDataFactory = new SemanticDataFactory();
 }
開發者ID:hangya,項目名稱:SemanticMediaWiki,代碼行數:8,代碼來源:ApiBrowseBySubjectDBIntegrationTest.php

示例14: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->semanticDataFactory = UtilityFactory::getInstance()->newSemanticDataFactory();
     $this->fixturesProvider = UtilityFactory::getInstance()->newFixturesFactory()->newFixturesProvider();
     $this->fixturesProvider->setupDependencies($this->getStore());
     $this->getStore()->updateData($this->fixturesProvider->getFactsheet('Berlin')->asEntity());
     $this->getStore()->updateData($this->fixturesProvider->getFactsheet('Paris')->asEntity());
 }
開發者ID:whysasse,項目名稱:kmwiki,代碼行數:9,代碼來源:ConceptQueryDBIntegrationTest.php

示例15: setUp

 protected function setUp()
 {
     parent::setUp();
     // Variable set using phpunit.xml
     if (isset($GLOBALS['benchmarkShowMemoryUsage'])) {
         $this->showMemoryUsage = $GLOBALS['benchmarkShowMemoryUsage'];
     }
     $this->benchmarkRunner = new BenchmarkRunner($this->showMemoryUsage);
 }
開發者ID:WolfgangFahl,項目名稱:SemanticMediaWiki,代碼行數:9,代碼來源:PageEditBenchmarkTest.php


注:本文中的SMW\Tests\MwDBaseUnitTestCase::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。