@@ -716,7 +716,7 @@ public function testFindAlternativesOutput()
716
716
717
717
public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces ()
718
718
{
719
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['getNamespaces ' ])->getMock ();
719
+ $ application = $ this ->getMockBuilder (Application::class)->onlyMethods (['getNamespaces ' ])->getMock ();
720
720
$ application ->expects ($ this ->once ())
721
721
->method ('getNamespaces ' )
722
722
->willReturn (['foo:sublong ' , 'bar:sub ' ]);
@@ -876,7 +876,7 @@ public function testRenderExceptionEscapesLines()
876
876
877
877
public function testRenderExceptionLineBreaks ()
878
878
{
879
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['getTerminalWidth ' ])->getMock ();
879
+ $ application = $ this ->getMockBuilder (Application::class)->addMethods (['getTerminalWidth ' ])->getMock ();
880
880
$ application ->setAutoExit (false );
881
881
$ application ->expects ($ this ->any ())
882
882
->method ('getTerminalWidth ' )
@@ -1103,7 +1103,7 @@ public function testRunReturnsIntegerExitCode()
1103
1103
{
1104
1104
$ exception = new \Exception ('' , 4 );
1105
1105
1106
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['doRun ' ])->getMock ();
1106
+ $ application = $ this ->getMockBuilder (Application::class)->onlyMethods (['doRun ' ])->getMock ();
1107
1107
$ application ->setAutoExit (false );
1108
1108
$ application ->expects ($ this ->once ())
1109
1109
->method ('doRun ' )
@@ -1142,7 +1142,7 @@ public function testRunReturnsExitCodeOneForExceptionCodeZero()
1142
1142
{
1143
1143
$ exception = new \Exception ('' , 0 );
1144
1144
1145
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['doRun ' ])->getMock ();
1145
+ $ application = $ this ->getMockBuilder (Application::class)->onlyMethods (['doRun ' ])->getMock ();
1146
1146
$ application ->setAutoExit (false );
1147
1147
$ application ->expects ($ this ->once ())
1148
1148
->method ('doRun ' )
@@ -1185,7 +1185,7 @@ public function testRunReturnsExitCodeOneForNegativeExceptionCode($exceptionCode
1185
1185
{
1186
1186
$ exception = new \Exception ('' , $ exceptionCode );
1187
1187
1188
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['doRun ' ])->getMock ();
1188
+ $ application = $ this ->getMockBuilder (Application::class)->onlyMethods (['doRun ' ])->getMock ();
1189
1189
$ application ->setAutoExit (false );
1190
1190
$ application ->expects ($ this ->once ())
1191
1191
->method ('doRun ' )
0 commit comments