Skip to content

Commit 25e5f86

Browse files
Merge branch '6.2' into 6.3
* 6.2: [Security] remove deprecated conditions in supports and authenticate methods from AccessListener class [Tests] Replace `setMethods()` by `onlyMethods()` and `addMethods()`
2 parents e65ce5c + 75ed641 commit 25e5f86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/ProcessFailedExceptionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)