@@ -19,23 +19,23 @@ public function testSortingByPriority()
19
19
{
20
20
$ tester = $ this ->createCommandTester ();
21
21
$ result = $ tester ->execute (['--sort ' => 'priority ' ], ['decorated ' => false ]);
22
- $ this ->assertEquals (0 , $ result , 'Returns 0 in case of success ' );
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
24
}
25
25
26
26
public function testSortingByName ()
27
27
{
28
28
$ tester = $ this ->createCommandTester ();
29
29
$ result = $ tester ->execute (['--sort ' => 'name ' ], ['decorated ' => false ]);
30
- $ this ->assertEquals (0 , $ result , 'Returns 0 in case of success ' );
30
+ $ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
31
31
$ this ->assertRegExp ('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta)/m ' , $ tester ->getDisplay (true ));
32
32
}
33
33
34
34
public function testSortingByPath ()
35
35
{
36
36
$ tester = $ this ->createCommandTester ();
37
37
$ result = $ tester ->execute (['--sort ' => 'path ' ], ['decorated ' => false ]);
38
- $ this ->assertEquals (0 , $ result , 'Returns 0 in case of success ' );
38
+ $ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
39
39
$ this ->assertRegExp ('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform)/m ' , $ tester ->getDisplay (true ));
40
40
}
41
41
@@ -57,26 +57,34 @@ public function testSortingByPriorityWithDuplicatePath()
57
57
{
58
58
$ tester = $ this ->createCommandTesterWithDuplicatePath ();
59
59
$ result = $ tester ->execute (['--sort ' => 'priority ' ], ['decorated ' => false ]);
60
- $ this ->assertEquals (0 , $ result , 'Returns 0 in case of success ' );
60
+ $ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
61
61
$ this ->assertRegExp ('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo).*\n\W*(echo)/m ' , $ tester ->getDisplay (true ));
62
62
}
63
63
64
64
public function testSortingByNameWithDuplicatePath ()
65
65
{
66
66
$ tester = $ this ->createCommandTesterWithDuplicatePath ();
67
67
$ result = $ tester ->execute (['--sort ' => 'name ' ], ['decorated ' => false ]);
68
- $ this ->assertEquals (0 , $ result , 'Returns 0 in case of success ' );
68
+ $ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
69
69
$ this ->assertRegExp ('/(alfa).*\n\W*(bravo).*\n\W*(charlie).*\n\W*(delta).*\n\W*(echo)/m ' , $ tester ->getDisplay (true ));
70
70
}
71
71
72
72
public function testSortingByPathWithDuplicatePath ()
73
73
{
74
74
$ tester = $ this ->createCommandTesterWithDuplicatePath ();
75
75
$ result = $ tester ->execute (['--sort ' => 'path ' ], ['decorated ' => false ]);
76
- $ this ->assertEquals (0 , $ result , 'Returns 0 in case of success ' );
76
+ $ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
77
77
$ this ->assertRegExp ('/(\/romeo).*\n.*(\/sierra).*\n.*(\/tango).*\n.*(\/uniform).*\n.*(\/uniform)/m ' , $ tester ->getDisplay (true ));
78
78
}
79
79
80
+ public function testWithoutCallingSortOptionExplicitly ()
81
+ {
82
+ $ tester = $ this ->createCommandTester ();
83
+ $ result = $ tester ->execute ([], ['decorated ' => false ]);
84
+ $ this ->assertSame (0 , $ result , 'Returns 0 in case of success ' );
85
+ $ this ->assertRegExp ('/(charlie).*\n\W*(alfa).*\n\W*(delta).*\n\W*(bravo)/m ' , $ tester ->getDisplay (true ));
86
+ }
87
+
80
88
private function createCommandTester (): CommandTester
81
89
{
82
90
$ application = new Application ($ this ->getKernel ());
0 commit comments