Laravel version update
Laravel version update
This commit is contained in:
@@ -11,31 +11,30 @@
|
||||
|
||||
namespace Symfony\Component\Process\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Process\Exception\ProcessFailedException;
|
||||
|
||||
/**
|
||||
* @author Sebastian Marek <proofek@gmail.com>
|
||||
*/
|
||||
class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
class ProcessFailedExceptionTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* tests ProcessFailedException throws exception if the process was successful.
|
||||
*/
|
||||
public function testProcessFailedExceptionThrowsException()
|
||||
{
|
||||
$process = $this->getMock(
|
||||
'Symfony\Component\Process\Process',
|
||||
array('isSuccessful'),
|
||||
array('php')
|
||||
);
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful'))->setConstructorArgs(array('php'))->getMock();
|
||||
$process->expects($this->once())
|
||||
->method('isSuccessful')
|
||||
->will($this->returnValue(true));
|
||||
|
||||
$this->setExpectedException(
|
||||
'\InvalidArgumentException',
|
||||
'Expected a failed process, but the given process was successful.'
|
||||
);
|
||||
if (method_exists($this, 'expectException')) {
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Expected a failed process, but the given process was successful.');
|
||||
} else {
|
||||
$this->setExpectedException(\InvalidArgumentException::class, 'Expected a failed process, but the given process was successful.');
|
||||
}
|
||||
|
||||
new ProcessFailedException($process);
|
||||
}
|
||||
@@ -53,11 +52,7 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
$errorOutput = 'FATAL: Unexpected error';
|
||||
$workingDirectory = getcwd();
|
||||
|
||||
$process = $this->getMock(
|
||||
'Symfony\Component\Process\Process',
|
||||
array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'),
|
||||
array($cmd)
|
||||
);
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled', 'getWorkingDirectory'))->setConstructorArgs(array($cmd))->getMock();
|
||||
$process->expects($this->once())
|
||||
->method('isSuccessful')
|
||||
->will($this->returnValue(false));
|
||||
@@ -105,11 +100,7 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
$exitText = 'General error';
|
||||
$workingDirectory = getcwd();
|
||||
|
||||
$process = $this->getMock(
|
||||
'Symfony\Component\Process\Process',
|
||||
array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'),
|
||||
array($cmd)
|
||||
);
|
||||
$process = $this->getMockBuilder('Symfony\Component\Process\Process')->setMethods(array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput', 'getWorkingDirectory'))->setConstructorArgs(array($cmd))->getMock();
|
||||
$process->expects($this->once())
|
||||
->method('isSuccessful')
|
||||
->will($this->returnValue(false));
|
||||
|
Reference in New Issue
Block a user