add unit test for resuming uploads

This commit is contained in:
terrafrost 2020-12-18 21:34:21 -06:00
parent df22fa0487
commit 9637e25bf7

View File

@ -167,6 +167,23 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase
'Failed asserting that get() returns expected example data.'
);
$this->assertTrue(
$sftp->put('file1.txt', 'xxx', SFTP::RESUME),
'Failed asserting that an upload could be successfully resumed'
);
$this->assertSame(
self::$exampleDataLength + 3,
$sftp->filesize('file1.txt'),
'Failed asserting that put example data has the expected length'
);
$this->assertSame(
self::$exampleData . 'zzz',
$sftp->get('file1.txt'),
'Failed asserting that get() returns expected example data.'
);
return $sftp;
}