@@ -25,7 +25,7 @@ class ProcessFailedExceptionTest extends TestCase
25
25
*/
26
26
public function testProcessFailedExceptionThrowsException ()
27
27
{
28
- $ process = $ this ->getMockBuilder (Process::class)->setMethods (['isSuccessful ' ])->setConstructorArgs ([['php ' ]])->getMock ();
28
+ $ process = $ this ->getMockBuilder (Process::class)->onlyMethods (['isSuccessful ' ])->setConstructorArgs ([['php ' ]])->getMock ();
29
29
$ process ->expects ($ this ->once ())
30
30
->method ('isSuccessful ' )
31
31
->willReturn (true );
@@ -49,7 +49,7 @@ public function testProcessFailedExceptionPopulatesInformationFromProcessOutput(
49
49
$ errorOutput = 'FATAL: Unexpected error ' ;
50
50
$ workingDirectory = getcwd ();
51
51
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 ();
53
53
$ process ->expects ($ this ->once ())
54
54
->method ('isSuccessful ' )
55
55
->willReturn (false );
@@ -97,7 +97,7 @@ public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput()
97
97
$ exitText = 'General error ' ;
98
98
$ workingDirectory = getcwd ();
99
99
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 ();
101
101
$ process ->expects ($ this ->once ())
102
102
->method ('isSuccessful ' )
103
103
->willReturn (false );
0 commit comments