fix test case for append

This commit is contained in:
Robin Appelman 2018-08-28 16:24:40 +02:00
commit 0fc2a0820c

View file

@ -475,6 +475,7 @@ abstract class AbstractShareTest extends TestCase {
} }
public function testAppendStream() { public function testAppendStream() {
$name = 'foo.txt';
$fh = $this->share->append($this->root . '/' . $name); $fh = $this->share->append($this->root . '/' . $name);
fwrite($fh, 'foo'); fwrite($fh, 'foo');
fclose($fh); fclose($fh);
@ -484,6 +485,7 @@ abstract class AbstractShareTest extends TestCase {
fclose($fh); fclose($fh);
$tmpFile1 = tempnam('/tmp', 'smb_test_'); $tmpFile1 = tempnam('/tmp', 'smb_test_');
$this->share->get($this->root . '/' . $name, $tmpFile1);
$this->assertEquals('foobar', file_get_contents($tmpFile1)); $this->assertEquals('foobar', file_get_contents($tmpFile1));
$this->share->del($this->root . '/' . $name); $this->share->del($this->root . '/' . $name);
unlink($tmpFile1); unlink($tmpFile1);