[BC] Upgraded dependencies, dropped support for anything below PHP 8.0. (#849)
* GitHub actions + style fixes + updated packages * Fixed workflows dir * Support for PHP 8.1 (#1) * Update README.md * Revert some changes from upstream
This commit is contained in:
parent
72c946dc7d
commit
111c153428
335 changed files with 4394 additions and 28116 deletions
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace Alchemy\Tests\BinaryDriver\Exceptions;
|
||||
|
||||
use Alchemy\BinaryDriver\BinaryDriverTestCase;
|
||||
use Alchemy\BinaryDriver\Exception\ExecutionFailureException;
|
||||
use Alchemy\BinaryDriver\ProcessRunner;
|
||||
|
||||
class ExecutionFailureExceptionTest extends BinaryDriverTestCase
|
||||
{
|
||||
public function getProcessRunner($logger)
|
||||
{
|
||||
return new ProcessRunner($logger, 'test-runner');
|
||||
}
|
||||
|
||||
public function testGetExceptionInfo(){
|
||||
|
||||
$logger = $this->createLoggerMock();
|
||||
$runner = $this->getProcessRunner($logger);
|
||||
|
||||
$process = $this->createProcessMock(1, false, '--helloworld--', null, "Error Output", true);
|
||||
try{
|
||||
$runner->run($process, new \SplObjectStorage(), false);
|
||||
$this->fail('An exception should have been raised');
|
||||
}
|
||||
catch (ExecutionFailureException $e){
|
||||
$this->assertEquals("--helloworld--", $e->getCommand());
|
||||
$this->assertEquals("Error Output", $e->getErrorOutput());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue