当前位置: 首页>>代码示例>>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;未经允许,请勿转载。