From 579e51c58f07a5ba4e58c574e2e9a8d30c58455a Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 19 Oct 2015 00:06:41 +0200 Subject: [PATCH] Add test case for GitHub Issue 850: Realpath in SFTP chmod(). --- tests/Functional/Net/SFTPUserStoryTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Functional/Net/SFTPUserStoryTest.php b/tests/Functional/Net/SFTPUserStoryTest.php index 770ad95b..c01948f4 100644 --- a/tests/Functional/Net/SFTPUserStoryTest.php +++ b/tests/Functional/Net/SFTPUserStoryTest.php @@ -238,6 +238,20 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase /** * @depends testTruncate + * @group github850 + */ + public function testChModOnFile($sftp) + { + $this->assertNotFalse( + $sftp->chmod(0755, 'file1.txt'), + 'Failed asserting that chmod() was successful.' + ); + + return $sftp; + } + + /** + * @depends testChModOnFile */ public function testChDirOnFile($sftp) {