From f1865af5054bfa3241ed2d8e584925ddfb44796f Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 12 Dec 2014 19:38:04 +0100 Subject: [PATCH] Properly skip SFTPLargeFileTest when environment variables not defined. --- tests/Functional/Net/SFTPLargeFileTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Functional/Net/SFTPLargeFileTest.php b/tests/Functional/Net/SFTPLargeFileTest.php index 3b1128df..1c78f496 100644 --- a/tests/Functional/Net/SFTPLargeFileTest.php +++ b/tests/Functional/Net/SFTPLargeFileTest.php @@ -43,8 +43,10 @@ class Functional_Net_SFTPLargeFileTest extends PhpseclibFunctionalTestCase public function tearDown() { - $this->sftp->chdir($this->getEnv('SSH_HOME')); - $this->sftp->delete($this->scratchDir); + if ($this->sftp) { + $this->sftp->chdir($this->getEnv('SSH_HOME')); + $this->sftp->delete($this->scratchDir); + } parent::tearDown(); }