diff options
-rw-r--r-- | tests/codeigniter/helpers/directory_helper_test.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php index 41370e6e7..214ad2c1c 100644 --- a/tests/codeigniter/helpers/directory_helper_test.php +++ b/tests/codeigniter/helpers/directory_helper_test.php @@ -14,6 +14,8 @@ class Directory_helper_test extends CI_TestCase { public function test_directory_map() { + $ds = DIRECTORY_SEPARATOR; + $structure = array( 'libraries' => array( 'benchmark.html' => '', @@ -28,9 +30,9 @@ class Directory_helper_test extends CI_TestCase { // 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 @@ class Directory_helper_test extends CI_TestCase { $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)); } } |