@@ -21,6 +21,7 @@ public function testSortingByPriority()
21
21
$ result = $ tester ->execute (['--sort ' => 'priority ' ], ['decorated ' => false ]);
22
22
$ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
23
23
$ this ->assertRegExp ('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo)/m ' , $ tester ->getDisplay (true ));
24
+ $ this ->assertStringNotContainsString ('! [CAUTION] The routes list is not sorted in the parsing order. ' , $ tester ->getDisplay (true ));
24
25
}
25
26
26
27
public function testSortingByName ()
@@ -29,6 +30,7 @@ public function testSortingByName()
29
30
$ result = $ tester ->execute (['--sort ' => 'name ' ], ['decorated ' => false ]);
30
31
$ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
31
32
$ this ->assertRegExp ('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta)/m ' , $ tester ->getDisplay (true ));
33
+ $ this ->assertStringContainsString ('! [CAUTION] The routes list is not sorted in the parsing order. ' , $ tester ->getDisplay (true ));
32
34
}
33
35
34
36
public function testSortingByPath ()
@@ -37,6 +39,7 @@ public function testSortingByPath()
37
39
$ result = $ tester ->execute (['--sort ' => 'path ' ], ['decorated ' => false ]);
38
40
$ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
39
41
$ this ->assertRegExp ('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform)/m ' , $ tester ->getDisplay (true ));
42
+ $ this ->assertStringContainsString ('! [CAUTION] The routes list is not sorted in the parsing order. ' , $ tester ->getDisplay (true ));
40
43
}
41
44
42
45
public function testThrowsExceptionWithInvalidParameter ()
@@ -59,6 +62,7 @@ public function testSortingByPriorityWithDuplicatePath()
59
62
$ result = $ tester ->execute (['--sort ' => 'priority ' ], ['decorated ' => false ]);
60
63
$ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
61
64
$ this ->assertRegExp ('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo).*\n\W*(echo)/m ' , $ tester ->getDisplay (true ));
65
+ $ this ->assertStringNotContainsString ('! [CAUTION] The routes list is not sorted in the parsing order. ' , $ tester ->getDisplay (true ));
62
66
}
63
67
64
68
public function testSortingByNameWithDuplicatePath ()
@@ -67,6 +71,7 @@ public function testSortingByNameWithDuplicatePath()
67
71
$ result = $ tester ->execute (['--sort ' => 'name ' ], ['decorated ' => false ]);
68
72
$ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
69
73
$ this ->assertRegExp ('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta).*\n\W*(echo)/m ' , $ tester ->getDisplay (true ));
74
+ $ this ->assertStringContainsString ('! [CAUTION] The routes list is not sorted in the parsing order. ' , $ tester ->getDisplay (true ));
70
75
}
71
76
72
77
public function testSortingByPathWithDuplicatePath ()
@@ -75,6 +80,7 @@ public function testSortingByPathWithDuplicatePath()
75
80
$ result = $ tester ->execute (['--sort ' => 'path ' ], ['decorated ' => false ]);
76
81
$ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
77
82
$ this ->assertRegExp ('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform).*\n.*(\/uniform)/m ' , $ tester ->getDisplay (true ));
83
+ $ this ->assertStringContainsString ('! [CAUTION] The routes list is not sorted in the parsing order. ' , $ tester ->getDisplay (true ));
78
84
}
79
85
80
86
public function testWithoutCallingSortOptionExplicitly ()
@@ -83,6 +89,7 @@ public function testWithoutCallingSortOptionExplicitly()
83
89
$ result = $ tester ->execute ([], ['decorated ' => false ]);
84
90
$ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
85
91
$ this ->assertRegExp ('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo)/m ' , $ tester ->getDisplay (true ));
92
+ $ this ->assertStringNotContainsString ('! [CAUTION] The routes list is not sorted in the parsing order. ' , $ tester ->getDisplay (true ));
86
93
}
87
94
88
95
private function createCommandTester (): CommandTester
0 commit comments