Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Put some assertions into testStatcacheFix(). #413

Merged
merged 1 commit into from

3 participants

@bantu
Owner

From #409

@terrafrost
Owner

Looks good to me!

@bantu bantu merged commit 7dd01c6 into phpseclib:master

1 check passed

Details continuous-integration/travis-ci The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 18, 2014
  1. @bantu
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 5 deletions.
  1. +14 −5 tests/Functional/Net/SFTPUserStoryTest.php
View
19 tests/Functional/Net/SFTPUserStoryTest.php
@@ -348,11 +348,20 @@ public function testReadlink($sftp)
*/
public function testStatcacheFix($sftp)
{
- $sftp->mkdir('testdir');
- $sftp->chdir('testdir');
- $sftp->touch('testdir');
- $sftp->chdir('..');
- $sftp->delete('testdir', true);
+ // Name used for both directory and file.
+ $name = 'stattestdir';
+ $this->assertTrue($sftp->mkdir($name));
+ $this->assertTrue($sftp->is_dir($name));
+ $this->assertTrue($sftp->chdir($name));
+ $this->assertStringEndsWith(self::$scratchDir . '/' . $name, $sftp->pwd());
+ $this->assertFalse($sftp->file_exists($name));
+ $this->assertTrue($sftp->touch($name));
+ $this->assertTrue($sftp->is_file($name));
+ $this->assertTrue($sftp->chdir('..'));
+ $this->assertStringEndsWith(self::$scratchDir, $sftp->pwd());
+ $this->assertTrue($sftp->is_dir($name));
+ $this->assertTrue($sftp->is_file("$name/$name"));
+ $this->assertTrue($sftp->delete($name, true));
return $sftp;
}
Something went wrong with that request. Please try again.