예제 #1
0
 public function testTimeout()
 {
     $command = new Command('asd', true, 0.1);
     $this->assertEquals(0.1, $command->getTimeout());
     $this->assertTrue($command->isRequired());
     $this->assertEquals('asd', $command->getCommand());
 }
예제 #2
0
 /**
  * @param Command $command
  *
  * @return $this
  */
 public function addCommand(Command $command)
 {
     $data = $this->prefix . $command->getCommand();
     $command->setCommand($data);
     if (null === $command->getTimeout()) {
         $command->setTimeout($this->getTimeout());
     }
     $this->commands[] = $command;
     return $this;
 }