@@ -631,7 +631,7 @@ public function testSortByName()
631
631
{
632
632
$ finder = $ this ->buildFinder ();
633
633
$ this ->assertSame ($ finder , $ finder ->sortByName ());
634
- $ this ->assertIterator ($ this ->toAbsolute ([
634
+ $ this ->assertOrderedIterator ($ this ->toAbsolute ([
635
635
'foo ' ,
636
636
'foo bar ' ,
637
637
'foo/bar.tmp ' ,
@@ -654,14 +654,12 @@ public function testSortByType()
654
654
{
655
655
$ finder = $ this ->buildFinder ();
656
656
$ this ->assertSame ($ finder , $ finder ->sortByType ());
657
- $ this ->assertIterator ($ this ->toAbsolute ([
657
+ $ this ->assertOrderedIterator ($ this ->toAbsolute ([
658
658
'foo ' ,
659
- 'foo bar ' ,
659
+ 'qux ' ,
660
660
'toto ' ,
661
+ 'foo bar ' ,
661
662
'foo/bar.tmp ' ,
662
- 'test.php ' ,
663
- 'test.py ' ,
664
- 'qux ' ,
665
663
'qux/baz_100_1.py ' ,
666
664
'qux/baz_1_2.py ' ,
667
665
'qux_0_1.php ' ,
@@ -670,14 +668,16 @@ public function testSortByType()
670
668
'qux_10_2.php ' ,
671
669
'qux_12_0.php ' ,
672
670
'qux_2_0.php ' ,
671
+ 'test.php ' ,
672
+ 'test.py ' ,
673
673
]), $ finder ->in (self ::$ tmpDir )->getIterator ());
674
674
}
675
675
676
676
public function testSortByAccessedTime ()
677
677
{
678
678
$ finder = $ this ->buildFinder ();
679
679
$ this ->assertSame ($ finder , $ finder ->sortByAccessedTime ());
680
- $ this ->assertIterator ($ this ->toAbsolute ([
680
+ $ this ->assertOrderedIterator ($ this ->toAbsolute ([
681
681
'foo/bar.tmp ' ,
682
682
'test.php ' ,
683
683
'toto ' ,
@@ -700,7 +700,7 @@ public function testSortByChangedTime()
700
700
{
701
701
$ finder = $ this ->buildFinder ();
702
702
$ this ->assertSame ($ finder , $ finder ->sortByChangedTime ());
703
- $ this ->assertIterator ($ this ->toAbsolute ([
703
+ $ this ->assertOrderedIterator ($ this ->toAbsolute ([
704
704
'toto ' ,
705
705
'test.py ' ,
706
706
'test.php ' ,
@@ -723,7 +723,7 @@ public function testSortByModifiedTime()
723
723
{
724
724
$ finder = $ this ->buildFinder ();
725
725
$ this ->assertSame ($ finder , $ finder ->sortByModifiedTime ());
726
- $ this ->assertIterator ($ this ->toAbsolute ([
726
+ $ this ->assertOrderedIterator ($ this ->toAbsolute ([
727
727
'foo/bar.tmp ' ,
728
728
'test.php ' ,
729
729
'toto ' ,
@@ -770,27 +770,27 @@ public function testSortByNameNatural()
770
770
{
771
771
$ finder = $ this ->buildFinder ();
772
772
$ this ->assertSame ($ finder , $ finder ->sortByName (true ));
773
- $ this ->assertIterator ($ this ->toAbsolute ([
773
+ $ this ->assertOrderedIterator ($ this ->toAbsolute ([
774
774
'foo ' ,
775
- 'foo bar ' ,
776
775
'foo/bar.tmp ' ,
776
+ 'foo bar ' ,
777
777
'qux ' ,
778
- 'qux/baz_100_1.py ' ,
779
778
'qux/baz_1_2.py ' ,
779
+ 'qux/baz_100_1.py ' ,
780
780
'qux_0_1.php ' ,
781
- 'qux_1000_1.php ' ,
782
- 'qux_1002_0.php ' ,
781
+ 'qux_2_0.php ' ,
783
782
'qux_10_2.php ' ,
784
783
'qux_12_0.php ' ,
785
- 'qux_2_0.php ' ,
784
+ 'qux_1000_1.php ' ,
785
+ 'qux_1002_0.php ' ,
786
786
'test.php ' ,
787
787
'test.py ' ,
788
788
'toto ' ,
6D40
div>
789
789
]), $ finder ->in (self ::$ tmpDir )->getIterator ());
790
790
791
791
$ finder = $ this ->buildFinder ();
792
792
$ this ->assertSame ($ finder , $ finder ->sortByName (false ));
793
- $ this ->assertIterator ($ this ->toAbsolute ([
793
+ $ this ->assertOrderedIterator ($ this ->toAbsolute ([
794
794
'foo ' ,
795
795
'foo bar ' ,
796
796
'foo/bar.tmp ' ,
@@ -813,13 +813,10 @@ public function testSort()
813
813
{
814
814
$ finder = $ this ->buildFinder ();
815
815
$ this ->assertSame ($ finder , $ finder ->sort (function (\SplFileInfo $ a , \SplFileInfo $ b ) { return strcmp ($ a ->getRealPath (), $ b ->getRealPath ()); }));
816
- $ this ->assertIterator ($ this ->toAbsolute ([
816
+ $ this ->assertOrderedIterator ($ this ->toAbsolute ([
817
817
'foo ' ,
818
818
'foo bar ' ,
819
819
'foo/bar.tmp ' ,
820
- 'test.php ' ,
821
- 'test.py ' ,
822
- 'toto ' ,
823
820
'qux ' ,
824
821
'qux/baz_100_1.py ' ,
825
822
'qux/baz_1_2.py ' ,
@@ -829,6 +826,9 @@ public function testSort()
829
826
'qux_10_2.php ' ,
830
827
'qux_12_0.php ' ,
831
828
'qux_2_0.php ' ,
829
+ 'test.php ' ,
830
+ 'test.py ' ,
831
+ 'toto ' ,
832
832
]), $ finder ->in (self ::$ tmpDir )->getIterator ());
833
833
}
834
834
0 commit comments