summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlakoff <vlakoff@gmail.com>2013-07-16 18:11:59 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-19 11:47:57 +0200
commit464ffae2f4ea189d4f994d37eb1167c0b35ffcf9 (patch)
treeb8d2499bcb13aba9cc3fed5433e57920d411f11f
parentf46b16b096fd4861486138b604a29ba19c0cda88 (diff)
Fix test_directory_map
See #2475 and point 2 of #2334
-rw-r--r--tests/codeigniter/helpers/directory_helper_test.php10
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));
}
}