Beispiel #1
0
 private function assertDestFileDoesntExist($filePath)
 {
     $command = new Ssh\Command($this->sourceSsh);
     $command->exec("cat " . escapeshellarg($filePath));
     $this->assertFalse($command->success());
 }
 public function testBasicRemoteToRemoteSync()
 {
     $options = $this->getRemoteToRemoteOptions();
     $dbSync = new DatabaseSync($options);
     $success = $dbSync->sync([$this, "statusCallback"]);
     $this->assertTrue($success);
     $scmd = new Ssh\Command($this->destSsh);
     $remoteQueryCommand = CommandUtil::buildMysqlCommand($options['dest']['db']);
     $remoteQueryCommand .= " -e 'select name, content from wp_deploy_synctest'";
     $scmd->exec($remoteQueryCommand);
     $this->assertTrue($scmd->success());
     $this->assertRegExp("/test_value_one\ttest_content_one/", $scmd->getOutput());
 }
 public function testNoError()
 {
     $command = new Command($this->session);
     $command->exec("ls");
     $this->assertEmpty($command->getError());
 }