当前位置: 首页>>代码示例>>PHP>>正文


PHP OX_Component::_getComponentsFiles方法代码示例

本文整理汇总了PHP中OX_Component::_getComponentsFiles方法的典型用法代码示例。如果您正苦于以下问题:PHP OX_Component::_getComponentsFiles方法的具体用法?PHP OX_Component::_getComponentsFiles怎么用?PHP OX_Component::_getComponentsFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OX_Component的用法示例。


在下文中一共展示了OX_Component::_getComponentsFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_getComponentFilesFromDirectory

 function test_getComponentFilesFromDirectory()
 {
     $GLOBALS['_MAX']['CONF']['pluginPaths']['plugins'] = '/lib/OX/Plugin/tests/data/testExtensions/';
     $GLOBALS['_MAX']['CONF']['pluginGroupComponents'] = array('testGroup1' => 1, 'testGroup2' => 1);
     $extension = 'testExtension1';
     $group = 'testGroup1';
     $recursive = 0;
     $aResult = OX_Component::_getComponentsFiles($extension, $group, $recursive);
     $this->assertEqual(count($aResult), 1);
     $this->assertTrue(isset($aResult['testGroup1']));
     $this->assertEqual(count($aResult['testGroup1']), 2);
     $this->assertEqual($aResult['testGroup1'][0], 'testComponent1.class.php');
     $this->assertEqual($aResult['testGroup1'][1], 'testComponent2.class.php');
     $extension = 'testExtension1';
     $group = 'testGroup1';
     $recursive = 1;
     $aResult = OX_Component::_getComponentsFiles($extension, $group, $recursive);
     $this->assertEqual(count($aResult), 1);
     $this->assertTrue(isset($aResult['testGroup1']));
     $this->assertEqual(count($aResult['testGroup1']), 2);
     $this->assertEqual($aResult['testGroup1'][0], 'testComponent1.class.php');
     $this->assertEqual($aResult['testGroup1'][1], 'testComponent2.class.php');
     $extension = 'testExtension1';
     $group = 'testGroup2';
     $recursive = 0;
     $aResult = OX_Component::_getComponentsFiles($extension, $group, $recursive);
     $this->assertEqual(count($aResult), 1);
     $this->assertTrue(isset($aResult['testGroup2']));
     $this->assertEqual(count($aResult['testGroup2']), 2);
     $this->assertEqual($aResult['testGroup2'][0], 'testComponent1.class.php');
     $this->assertEqual($aResult['testGroup2'][1], 'testComponent2.class.php');
     $extension = 'testExtension1';
     $group = 'testGroup2';
     $recursive = 1;
     $aResult = OX_Component::_getComponentsFiles($extension, $group, $recursive);
     $this->assertEqual(count($aResult), 1);
     $this->assertTrue(isset($aResult['testGroup2']));
     $this->assertEqual(count($aResult['testGroup2']), 3);
     $this->assertEqual($aResult['testGroup2'][0], 'testComponent1.class.php');
     $this->assertEqual($aResult['testGroup2'][1], 'testComponent2.class.php');
     $this->assertEqual($aResult['testGroup2'][2], 'testComponent3.class.php');
 }
开发者ID:Jaree,项目名称:revive-adserver,代码行数:42,代码来源:Component.plg.test.php


注:本文中的OX_Component::_getComponentsFiles方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。