public function testSshInit() { if (X2_SCP_FILEOPER) { $this->assertEquals('php', FileUtil::$fileOper); FileUtil::sshInit(X2_SCP_HOST, X2_SCP_USER, X2_SCP_PASS); $this->assertEquals('scp', FileUtil::$fileOper); FileUtil::sshClose(); $this->assertEquals('php', FileUtil::$fileOper); } else { $this->markTestSkipped('Skipping: X2_SCP_FILEOPER is disabled.'); } }
public function useSsh($test) { if (X2_SCP_FILEOPER) { // Change to the tests directory so that relative paths work in testing. FileUtil::sshInit(X2_SCP_HOST, X2_SCP_USER, X2_SCP_PASS); $this->{$test}(); FileUtil::sshClose(); } else { $this->markTestSkipped('Skipping: X2_SCP_FILEOPER is disabled.'); } }