本文整理汇总了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();
}
示例2: setUp
protected function setUp()
{
parent::setUp();
$this->testEnvironment->addConfiguration('smwgEnabledDeferredUpdate', false);
$this->pageCreator = UtilityFactory::getInstance()->newPageCreator();
$this->semanticDataValidator = UtilityFactory::getInstance()->newValidatorFactory()->newSemanticDataValidator();
}
示例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();
}
示例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;
}
示例6: setUp
protected function setUp()
{
parent::setUp();
$this->dataValueFactory = DataValueFactory::getInstance();
$this->queryResultValidator = UtilityFactory::getInstance()->newValidatorFactory()->newQueryResultValidator();
$this->semanticDataFactory = UtilityFactory::getInstance()->newSemanticDataFactory();
}
示例7: setUp
protected function setUp()
{
parent::setUp();
$utilityFactory = UtilityFactory::getInstance();
$this->fileReader = $utilityFactory->newJsonFileReader(null);
$this->pageCreator = $utilityFactory->newPageCreator();
}
示例8: setUp
protected function setUp()
{
parent::setUp();
$this->mwHooksHandler = new MwHooksHandler();
$this->pageDeleter = new PageDeleter();
$this->pageCreator = new PageCreator();
}
示例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());
}
示例10: setUp
protected function setUp()
{
parent::setUp();
$utilityFactory = UtilityFactory::getInstance();
$this->pageCreator = $utilityFactory->newPageCreator();
$this->stringBuilder = $utilityFactory->newStringBuilder();
$this->stringValidator = $utilityFactory->newValidatorFactory()->newStringValidator();
}
示例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();
}
示例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);
}
示例13: setUp
protected function setUp()
{
parent::setUp();
$this->apiFactory = new MwApiFactory();
$this->dataValueFactory = DataValueFactory::getInstance();
$this->serializerFactory = new SerializerFactory();
$this->semanticDataFactory = new SemanticDataFactory();
}
示例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());
}
示例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);
}