本文整理汇总了PHP中Cake\Filesystem\Folder::subdirectories方法的典型用法代码示例。如果您正苦于以下问题:PHP Folder::subdirectories方法的具体用法?PHP Folder::subdirectories怎么用?PHP Folder::subdirectories使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cake\Filesystem\Folder
的用法示例。
在下文中一共展示了Folder::subdirectories方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testFolderSubdirectories
/**
* testFolderSubdirectories method
*
* @return void
*/
public function testFolderSubdirectories()
{
$path = CAKE . 'Network';
$folder = new Folder($path);
$expected = [$path . DS . 'Exception', $path . DS . 'Http', $path . DS . 'Session'];
$result = $folder->subdirectories();
$this->assertSame([], array_diff($expected, $result));
$result = $folder->subdirectories($path);
$this->assertSame([], array_diff($expected, $result));
$expected = ['Exception', 'Http', 'Session'];
$result = $folder->subdirectories(null, false);
$this->assertSame([], array_diff($expected, $result));
$result = $folder->subdirectories($path, false);
$this->assertSame([], array_diff($expected, $result));
$expected = [];
$result = $folder->subdirectories('NonExistantPath');
$this->assertSame([], array_diff($expected, $result));
$result = $folder->subdirectories($path . DS . 'Exception');
$this->assertSame([], array_diff($expected, $result));
}