mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Also add Share::getWrite to non native shares
This commit is contained in:
parent
7c2393afb0
commit
89d73346f2
7 changed files with 112 additions and 35 deletions
|
|
@ -68,17 +68,6 @@ class NativeStream extends \PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals(120, ftell($fh));
|
||||
}
|
||||
|
||||
public function testWrite() {
|
||||
$fh = $this->share->write($this->root . '/foobar');
|
||||
fwrite($fh, 'qwerty');
|
||||
fclose($fh);
|
||||
|
||||
$tmpFile1 = tempnam('/tmp', 'smb_test_');
|
||||
$this->share->get($this->root . '/foobar', $tmpFile1);
|
||||
$this->assertEquals('qwerty', file_get_contents($tmpFile1));
|
||||
unlink($tmpFile1);
|
||||
}
|
||||
|
||||
public function testStat() {
|
||||
$sourceFile = $this->getTextFile();
|
||||
$this->share->put($sourceFile, $this->root . '/foobar');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue