Skip to content
Snippets Groups Projects
Commit ef6db5e9 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

add seek and tell to streamwrapper test

parent b622fa50
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,16 @@ class Test_StreamWrappers extends PHPUnit_Framework_TestCase {
$this->assertEquals(array('.', '..', 'bar.txt', 'foo.txt'), scandir('oc:///'));
$this->assertEquals('qwerty', file_get_contents('oc:///bar.txt'));
$fh = fopen('oc:///bar.txt', 'rb');
$this->assertSame(0, ftell($fh));
$content = fread($fh, 4);
$this->assertSame(4, ftell($fh));
$this->assertSame('qwer', $content);
$content = fread($fh, 1);
$this->assertSame(5, ftell($fh));
$this->assertSame(0, fseek($fh, 0));
$this->assertSame(0, ftell($fh));
unlink('oc:///foo.txt');
$this->assertEquals(array('.', '..', 'bar.txt'), scandir('oc:///'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment