diff --git a/Tests/FinderTest.php b/Tests/FinderTest.php index e26aef16..d41879d1 100644 --- a/Tests/FinderTest.php +++ b/Tests/FinderTest.php @@ -631,7 +631,7 @@ public function testSortByName() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByName()); - $this->assertIterator($this->toAbsolute([ + $this->assertOrderedIterator($this->toAbsolute([ 'foo', 'foo bar', 'foo/bar.tmp', @@ -654,14 +654,12 @@ public function testSortByType() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByType()); - $this->assertIterator($this->toAbsolute([ + $this->assertOrderedIterator($this->toAbsolute([ 'foo', - 'foo bar', + 'qux', 'toto', + 'foo bar', 'foo/bar.tmp', - 'test.php', - 'test.py', - 'qux', 'qux/baz_100_1.py', 'qux/baz_1_2.py', 'qux_0_1.php', @@ -670,6 +668,8 @@ public function testSortByType() 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', + 'test.php', + 'test.py', ]), $finder->in(self::$tmpDir)->getIterator()); } @@ -770,19 +770,19 @@ public function testSortByNameNatural() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByName(true)); - $this->assertIterator($this->toAbsolute([ + $this->assertOrderedIterator($this->toAbsolute([ 'foo', - 'foo bar', 'foo/bar.tmp', + 'foo bar', 'qux', - 'qux/baz_100_1.py', 'qux/baz_1_2.py', + 'qux/baz_100_1.py', 'qux_0_1.php', - 'qux_1000_1.php', - 'qux_1002_0.php', + 'qux_2_0.php', 'qux_10_2.php', 'qux_12_0.php', - 'qux_2_0.php', + 'qux_1000_1.php', + 'qux_1002_0.php', 'test.php', 'test.py', 'toto', @@ -790,7 +790,7 @@ public function testSortByNameNatural() $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByName(false)); - $this->assertIterator($this->toAbsolute([ + $this->assertOrderedIterator($this->toAbsolute([ 'foo', 'foo bar', 'foo/bar.tmp', @@ -813,13 +813,10 @@ public function testSort() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealPath(), $b->getRealPath()); })); - $this->assertIterator($this->toAbsolute([ + $this->assertOrderedIterator($this->toAbsolute([ 'foo', 'foo bar', 'foo/bar.tmp', - 'test.php', - 'test.py', - 'toto', 'qux', 'qux/baz_100_1.py', 'qux/baz_1_2.py', @@ -829,6 +826,9 @@ public function testSort() 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', + 'test.php', + 'test.py', + 'toto', ]), $finder->in(self::$tmpDir)->getIterator()); }