@@ -25,7 +25,7 @@ class ProcessFailedExceptionTest extends TestCase
2525 */
2626 public function testProcessFailedExceptionThrowsException ()
2727 {
28- $ process = $ this ->getMockBuilder (Process::class)->setMethods (['isSuccessful ' ])->setConstructorArgs ([['php ' ]])->getMock ();
28+ $ process = $ this ->getMockBuilder (Process::class)->onlyMethods (['isSuccessful ' ])->setConstructorArgs ([['php ' ]])->getMock ();
2929 $ process ->expects ($ this ->once ())
3030 ->method ('isSuccessful ' )
3131 ->willReturn (true );
@@ -49,7 +49,7 @@ public function testProcessFailedExceptionPopulatesInformationFromProcessOutput(
4949 $ errorOutput = 'FATAL: Unexpected error ' ;
5050 $ workingDirectory = getcwd ();
5151
52- $ process = $ this ->getMockBuilder (Process::class)->setMethods (['isSuccessful ' , 'getOutput ' , 'getErrorOutput ' , 'getExitCode ' , 'getExitCodeText ' , 'isOutputDisabled ' , 'getWorkingDirectory ' ])->setConstructorArgs ([[$ cmd ]])->getMock ();
52+ $ process = $ this ->getMockBuilder (Process::class)->onlyMethods (['isSuccessful ' , 'getOutput ' , 'getErrorOutput ' , 'getExitCode ' , 'getExitCodeText ' , 'isOutputDisabled ' , 'getWorkingDirectory ' ])->setConstructorArgs ([[$ cmd ]])->getMock ();
5353 $ process ->expects ($ this ->once ())
5454 ->method ('isSuccessful ' )
5555 ->willReturn (false );
@@ -97,7 +97,7 @@ public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput()
9797 $ exitText = 'General error ' ;
9898 $ workingDirectory = getcwd ();
9999
100- $ process = $ this ->getMockBuilder (Process::class)->setMethods (['isSuccessful ' , 'isOutputDisabled ' , 'getExitCode ' , 'getExitCodeText ' , 'getOutput ' , 'getErrorOutput ' , 'getWorkingDirectory ' ])->setConstructorArgs ([[$ cmd ]])->getMock ();
100+ $ process = $ this ->getMockBuilder (Process::class)->onlyMethods (['isSuccessful ' , 'isOutputDisabled ' , 'getExitCode ' , 'getExitCodeText ' , 'getOutput ' , 'getErrorOutput ' , 'getWorkingDirectory ' ])->setConstructorArgs ([[$ cmd ]])->getMock ();
101101 $ process ->expects ($ this ->once ())
102102 ->method ('isSuccessful ' )
103103 ->willReturn (false );
0 commit comments