Skip to content
Browse files

Fixed some tests on Windows

  • Loading branch information...
1 parent 38c5c02 commit 1da9fdbfd75071a50f4afff9d9710461a94eec01 @stof stof committed Jan 18, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 Tests/Iterator/IteratorTestCase.php
View
4 Tests/Iterator/IteratorTestCase.php
@@ -17,7 +17,9 @@ protected function assertIterator($expected, \Traversable $iterator)
{
// set iterator_to_array $use_key to false to avoid values merge
// this made FinderTest::testAppendWithAnArray() failed with GnuFinderAdapter
- $values = array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator, false));
+ $values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false));
+
+ $expected = array_map(function ($path) { return str_replace('/', DIRECTORY_SEPARATOR, $path); }, $expected);
sort($values);
sort($expected);

0 comments on commit 1da9fdb

Please sign in to comment.
Something went wrong with that request. Please try again.