run() public method

Runing a command on remote server.
public run ( string $commandline, array $options = [] ) : ProcessResult
$commandline string
$options array
return ProcessResult
Ejemplo n.º 1
0
 public function testRun()
 {
     $this->runtimeTask->getOutput()->setVerbosity(3);
     $node = new Node();
     $node->setName("127.0.0.1");
     $process = new Process($this->runtimeTask, $node);
     $process->run("echo helloworld", array("cwd" => "~"));
     $output = $process->getRuntimeTask()->getOutput()->fetch();
     $this->assertRegExp("/helloworld/", $output);
     $this->assertRegExp('/Real command: bash -l -c "cd ~ && echo helloworld"/', $output);
     //echo $output;
 }