public function testInvalidCommand()
 {
     $this->skipIfNotUnix();
     $this->setExpectedException('\\RuntimeException', 'Invalid command "foobar" provided to ptlis\\ShellCommand\\CommandBuilder.');
     $builder = new CommandBuilder(new UnixEnvironment());
     $builder->setCommand('foobar')->buildCommand();
 }
 public function testTimeout()
 {
     $path = './tests/commands/unix/test_binary';
     $arguments = array('--foo bar', 'baz');
     $builder = new CommandBuilder(new MockEnvironment());
     $command = $builder->setCommand($path)->addArguments($arguments)->setPollTimeout(1000 * 1000)->setTimeout(60 * 1000 * 1000)->buildCommand();
     $this->assertSame(60 * 1000 * 1000, \PHPUnit_Framework_TestCase::readAttribute($command, 'timeout'));
 }