ShopwareCli\Tests\ProcessExecutorTest::testAllowFailingCommand PHP Method

testAllowFailingCommand() public method

    public function testAllowFailingCommand()
    {
        $output = new BufferedOutput();
        $executor = new ProcessExecutor($output, 60);
        $expectedOutput = "ls: cannot access '/no-such-file': No such file or directory\n";
        $exitCode = $executor->execute('LC_ALL=C ls /no-such-file', null, true);
        $this->assertEquals(2, $exitCode);
        $this->assertEquals($expectedOutput, $output->fetch());
    }