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()); }
/** * @param string $dumpFile * @return bool */ public function importDumpFile($dumpFile) { $importCommand = CommandUtil::buildImportCommandFromGunzipFile($this->buildDbParams(), $dumpFile); $this->command->exec($importCommand); return $this->command->success(); }