mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-09-07 14:21:49 +00:00
Merge branch 'master' into php5
* master: Put some assertions into testStatcacheFix().
This commit is contained in:
commit
e191ba32ea
@ -348,11 +348,20 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user