/** * @expectedException Arara\Process\Exception\RuntimeException * @expectedExceptionMessage Error when executing command */ public function testShouldThrowsAnExceptionWhenCommandExecutionFails() { $this->overwrite('pcntl_exec', function () { return false; }); $control = new Control(); $control->execute('/bin/date'); }