@@ -733,7 +733,7 @@ public function testFindAlternativesOutput()
733
733
734
734
public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces ()
735
735
{
736
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['getNamespaces ' ])->getMock ();
736
+ $ application = $ this ->getMockBuilder (Application::class)->onlyMethods (['getNamespaces ' ])->getMock ();
737
737
$ application ->expects ($ this ->once ())
738
738
->method ('getNamespaces ' )
739
739
->willReturn (['foo:sublong ' , 'bar:sub ' ]);
@@ -893,7 +893,7 @@ public function testRenderExceptionEscapesLines()
893
893
894
894
public function testRenderExceptionLineBreaks ()
895
895
{
896
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['getTerminalWidth ' ])->getMock ();
896
+ $ application = $ this ->getMockBuilder (Application::class)->addMethods (['getTerminalWidth ' ])->getMock ();
897
897
$ application ->setAutoExit (false );
898
898
$ application ->expects ($ this ->any ())
899
899
->method ('getTerminalWidth ' )
@@ -1120,7 +1120,7 @@ public function testRunReturnsIntegerExitCode()
1120
1120
{
1121
1121
$ exception = new \Exception ('' , 4 );
1122
1122
1123
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['doRun ' ])->getMock ();
1123
+ $ application = $ this ->getMockBuilder (Application::class)->onlyMethods (['doRun ' ])->getMock ();
1124
1124
$ application ->setAutoExit (false );
1125
1125
$ application ->expects ($ this ->once ())
1126
1126
->method ('doRun ' )
@@ -1159,7 +1159,7 @@ public function testRunReturnsExitCodeOneForExceptionCodeZero()
1159
1159
{
1160
1160
$ exception = new \Exception ('' , 0 );
1161
1161
1162
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['doRun ' ])->getMock ();
1162
+ $ application = $ this ->getMockBuilder (Application::class)->onlyMethods (['doRun ' ])->getMock ();
1163
1163
$ application ->setAutoExit (false );
1164
1164
$ application ->expects ($ this ->once ())
1165
1165
->method ('doRun ' )
@@ -1202,7 +1202,7 @@ public function testRunReturnsExitCodeOneForNegativeExceptionCode($exceptionCode
1202
1202
{
1203
1203
$ exception = new \Exception ('' , $ exceptionCode );
1204
1204
1205
- $ application = $ this ->getMockBuilder (Application::class)->setMethods (['doRun ' ])->getMock ();
1205
+ $ application = $ this ->getMockBuilder (Application::class)->onlyMethods (['doRun ' ])->getMock ();
1206
1206
$ application ->setAutoExit (false );
1207
1207
$ application ->expects ($ this ->once ())
1208
1208
->method ('doRun ' )
0 commit comments