mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-05 22:43:52 +09:00
Update composer dependencies
This commit is contained in:
@@ -24,10 +24,10 @@ class ProcessFailedExceptionTest extends TestCase
|
||||
*/
|
||||
public function testProcessFailedExceptionThrowsException()
|
||||
{
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful'))->setConstructorArgs(array(array('php')))->getMock();
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful'])->setConstructorArgs([['php']])->getMock();
|
||||
$process->expects($this->once())
|
||||
->method('isSuccessful')
|
||||
->will($this->returnValue(true));
|
||||
->willReturn(true);
|
||||
|
||||
if (method_exists($this, 'expectException')) {
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
@@ -52,34 +52,34 @@ class ProcessFailedExceptionTest extends TestCase
|
||||
$errorOutput = 'FATAL: Unexpected error';
|
||||
$workingDirectory = getcwd();
|
||||
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'))->setConstructorArgs(array(array($cmd)))->getMock();
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'])->setConstructorArgs([[$cmd]])->getMock();
|
||||
$process->expects($this->once())
|
||||
->method('isSuccessful')
|
||||
->will($this->returnValue(false));
|
||||
->willReturn(false);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('getOutput')
|
||||
->will($this->returnValue($output));
|
||||
->willReturn($output);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('getErrorOutput')
|
||||
->will($this->returnValue($errorOutput));
|
||||
->willReturn($errorOutput);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('getExitCode')
|
||||
->will($this->returnValue($exitCode));
|
||||
->willReturn($exitCode);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('getExitCodeText')
|
||||
->will($this->returnValue($exitText));
|
||||
->willReturn($exitText);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('isOutputDisabled')
|
||||
->will($this->returnValue(false));
|
||||
->willReturn(false);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('getWorkingDirectory')
|
||||
->will($this->returnValue($workingDirectory));
|
||||
->willReturn($workingDirectory);
|
||||
|
||||
$exception = new ProcessFailedException($process);
|
||||
|
||||
@@ -100,10 +100,10 @@ class ProcessFailedExceptionTest extends TestCase
|
||||
$exitText = 'General error';
|
||||
$workingDirectory = getcwd();
|
||||
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'))->setConstructorArgs(array(array($cmd)))->getMock();
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(['isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'])->setConstructorArgs([[$cmd]])->getMock();
|
||||
$process->expects($this->once())
|
||||
->method('isSuccessful')
|
||||
->will($this->returnValue(false));
|
||||
->willReturn(false);
|
||||
|
||||
$process->expects($this->never())
|
||||
->method('getOutput');
|
||||
@@ -113,19 +113,19 @@ class ProcessFailedExceptionTest extends TestCase
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('getExitCode')
|
||||
->will($this->returnValue($exitCode));
|
||||
->willReturn($exitCode);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('getExitCodeText')
|
||||
->will($this->returnValue($exitText));
|
||||
->willReturn($exitText);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('isOutputDisabled')
|
||||
->will($this->returnValue(true));
|
||||
->willReturn(true);
|
||||
|
||||
$process->expects($this->once())
|
||||
->method('getWorkingDirectory')
|
||||
->will($this->returnValue($workingDirectory));
|
||||
->willReturn($workingDirectory);
|
||||
|
||||
$exception = new ProcessFailedException($process);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user