Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/__tests__/FilesystemTestCase.php
| Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | $test_cases = array( | ||||
| ), | ), | ||||
| ), | ), | ||||
| ); | ); | ||||
| foreach ($test_cases as $test_case) { | foreach ($test_cases as $test_case) { | ||||
| list($path, $root, $expected) = $test_case; | list($path, $root, $expected) = $test_case; | ||||
| // On Windows, paths will have backslashes rather than forward slashes. | |||||
| // Normalize our expectations to the path format for the environment. | |||||
| foreach ($expected as $key => $epath) { | |||||
| $expected[$key] = str_replace('/', DIRECTORY_SEPARATOR, $epath); | |||||
| } | |||||
| $this->assertEqual( | $this->assertEqual( | ||||
| $expected, | $expected, | ||||
| Filesystem::walkToRoot($path, $root)); | Filesystem::walkToRoot($path, $root)); | ||||
| } | } | ||||
| } | } | ||||
| public function testisDescendant() { | public function testisDescendant() { | ||||
| $test_cases = array( | $test_cases = array( | ||||
| ▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines | |||||