Fix test_directory_map
See #2475 and point 2 of #2334
diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php
index 41370e6..214ad2c 100644
--- a/tests/codeigniter/helpers/directory_helper_test.php
+++ b/tests/codeigniter/helpers/directory_helper_test.php
@@ -14,6 +14,8 @@
public function test_directory_map()
{
+ $ds = DIRECTORY_SEPARATOR;
+
$structure = array(
'libraries' => array(
'benchmark.html' => '',
@@ -28,9 +30,9 @@
// test default recursive behavior
$expected = array(
- 'libraries/' => array(
+ 'libraries'.$ds => array(
'benchmark.html',
- 'database/' => array('active_record.html', 'binds.html'),
+ 'database'.$ds => array('active_record.html', 'binds.html'),
'email.html',
'0'
)
@@ -39,12 +41,12 @@
$this->assertEquals($expected, directory_map(vfsStream::url('testDir')));
// test detection of hidden files
- $expected['libraries/'][] = '.hiddenfile.txt';
+ $expected['libraries'.$ds][] = '.hiddenfile.txt';
$this->assertEquals($expected, directory_map(vfsStream::url('testDir'), FALSE, TRUE));
// test recursion depth behavior
- $this->assertEquals(array('libraries/'), directory_map(vfsStream::url('testDir'), 1));
+ $this->assertEquals(array('libraries'.$ds), directory_map(vfsStream::url('testDir'), 1));
}
}