本文整理汇总了PHP中eZINI::removeOverrideDir方法的典型用法代码示例。如果您正苦于以下问题:PHP eZINI::removeOverrideDir方法的具体用法?PHP eZINI::removeOverrideDir怎么用?PHP eZINI::removeOverrideDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZINI
的用法示例。
在下文中一共展示了eZINI::removeOverrideDir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testOverrideDirScopesExtensionRemove
/**
* Test prepending extension dirs and removing
*/
public function testOverrideDirScopesExtensionRemove()
{
$ini = new eZINI('site.ini', 'settings', null, null, true);
$ini->resetOverrideDirs();
$ini->prependOverrideDir("extension/ext1/settings", true, 'extension:ext1', 'extension');
$ini->prependOverrideDir("extension/ext2/settings", true, 'extension:ext2', 'extension');
$ini->prependOverrideDir("extension/ext3/settings", true, 'extension:ext3', 'extension');
$ini->prependOverrideDir("extension/ext1/settings", true, 'extension:ext1', 'sa-extension');
$ini->removeOverrideDir('extension:ext1');
$success = $ini->removeOverrideDir('extension:ext1', 'sa-extension');
$failed = $ini->removeOverrideDir('extension:ext8');
$overrideDirs = $ini->overrideDirs(false);
self::assertEquals(3, count($ini->overrideDirs()), 'There should have been three override dirs in total in this ini instance.');
self::assertEquals(2, count($overrideDirs['extension']), 'There should have been two override dirs in extension scope.');
self::assertEquals(0, count($overrideDirs['sa-extension']), 'There should have been 0 override dirs in sa-extension scope.');
self::assertTrue($success, '$ini->removeOverrideDir( \'extension:ext1\', \'sa-extension\' ) should have been returned true as identifier does exist.');
self::assertFalse($failed, '$ini->removeOverrideDir( \'extension:ext8\' ) should have been returned false as identifier does not exist.');
}