本文整理汇总了PHP中SMW\ApplicationFactory::clear方法的典型用法代码示例。如果您正苦于以下问题:PHP ApplicationFactory::clear方法的具体用法?PHP ApplicationFactory::clear怎么用?PHP ApplicationFactory::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMW\ApplicationFactory
的用法示例。
在下文中一共展示了ApplicationFactory::clear方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
/**
* @since 2.4
*/
public function tearDown()
{
foreach ($this->configuration as $key => $value) {
$GLOBALS[$key] = $value;
$this->applicationFactory->getSettings()->set($key, $value);
}
$this->applicationFactory->clear();
$this->dataValueFactory->clear();
}
示例2: tearDown
protected function tearDown()
{
ApplicationFactory::clear();
NamespaceExaminer::clear();
PropertyRegistry::clear();
Settings::clear();
Exporter::getInstance()->clear();
parent::tearDown();
}
示例3: testBaseTemplateToolboxURLEncoding
/**
* @dataProvider baseTemplateToolboxDataProvider
*/
public function testBaseTemplateToolboxURLEncoding($setup, $expected)
{
$toolbox = '';
foreach ($setup['settings'] as $key => $value) {
ApplicationFactory::getInstance()->getSettings()->set($key, $value);
}
$instance = new BaseTemplateToolbox($setup['skinTemplate'], $toolbox);
$instance->process();
$this->assertContains($expected, $toolbox['smw-browse']['href']);
ApplicationFactory::clear();
}
示例4: tearDown
protected function tearDown()
{
// If setUp is skipped early this might not be initialized
if ($this->testEnvironment !== null) {
$this->testEnvironment->tearDown();
}
ApplicationFactory::clear();
NamespaceExaminer::clear();
PropertyRegistry::clear();
Settings::clear();
Exporter::getInstance()->clear();
parent::tearDown();
}
示例5: tearDown
protected function tearDown()
{
ApplicationFactory::clear();
parent::tearDown();
}
示例6: testUpdateStore
public function testUpdateStore()
{
$store = $this->getMockBuilder('\\SMW\\Store')->disableOriginalConstructor()->setMethods(array('updateData'))->getMockForAbstractClass();
$store->expects($this->once())->method('updateData');
ApplicationFactory::getInstance()->registerObject('Store', $store);
$instance = new ParserData(Title::newFromText(__METHOD__), new ParserOutput());
$this->assertTrue($instance->updateStore());
ApplicationFactory::clear();
}