本文整理汇总了PHP中ResourceLoader::clearCache方法的典型用法代码示例。如果您正苦于以下问题:PHP ResourceLoader::clearCache方法的具体用法?PHP ResourceLoader::clearCache怎么用?PHP ResourceLoader::clearCache使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ResourceLoader
的用法示例。
在下文中一共展示了ResourceLoader::clearCache方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
protected function setUp()
{
parent::setUp();
ResourceLoader::clearCache();
$globals = [];
foreach (self::getSettings() as $key => $value) {
$globals['wg' . $key] = $value;
}
$this->setMwGlobals($globals);
}
示例2: setUp
protected function setUp()
{
parent::setUp();
ResourceLoader::clearCache();
$this->setMwGlobals(array('wgResourceLoaderDebug' => true, 'wgCacheEpoch' => '20140101000000', 'wgResourceLoaderSources' => array(), 'wgScriptPath' => '/w', 'wgScriptExtension' => '.php', 'wgScript' => '/w/index.php', 'wgLoadScript' => '/w/load.php'));
}
示例3: testMakeLoaderImplementScript
/**
* @dataProvider provideLoaderImplement
* @covers ResourceLoader::makeLoaderImplementScript
* @covers ResourceLoader::trimArray
*/
public function testMakeLoaderImplementScript($case)
{
$case += ['wrap' => true, 'styles' => [], 'templates' => [], 'messages' => new XmlJsCode('{}')];
ResourceLoader::clearCache();
$this->setMwGlobals('wgResourceLoaderDebug', true);
$rl = TestingAccessWrapper::newFromClass('ResourceLoader');
$this->assertEquals($case['expected'], $rl->makeLoaderImplementScript($case['name'], $case['wrap'] && is_string($case['scripts']) ? new XmlJsCode($case['scripts']) : $case['scripts'], $case['styles'], $case['messages'], $case['templates']));
}