markTestSkipped('Either SFTP_HOST, SFTP_USER, SFTP_PASSWORD and/or SFTP_BASE_DIR env variables are not defined.'); } $this->baseDir = rtrim($baseDir, '/') . '/' . uniqid(); $this->sftp = new SFTP($host, $port); $this->sftp->login($user, $password); $this->filesystem = new Filesystem(new PhpseclibSftp($this->sftp, $this->baseDir, true)); } public function tearDown() { if (!isset($this->sftp)) { return; } $this->sftp->rmdir($this->baseDir); } }