Lines Matching +full:s +full:- +full:tell
16 $this->expectException(BadMethodCallException::class);
17 $this->expectExceptionMessage('seek() is not implemented in the FnStream');
18 (new FnStream([]))->seek(1);
23 $s = new FnStream([
25 $this->assertEquals(3, $len);
30 $this->assertEquals('foo', $s->read(3));
36 $s = new FnStream([
41 unset($s);
42 $this->assertTrue($called);
50 $s = new FnStream([]);
51 unset($s);
58 $this->assertEquals(3, $b->getSize());
59 $this->assertEquals($b->isWritable(), true);
60 $this->assertEquals($b->isReadable(), true);
61 $this->assertEquals($b->isSeekable(), true);
62 $this->assertEquals($b->read(3), 'foo');
63 $this->assertEquals($b->tell(), 3);
64 $this->assertEquals($a->tell(), 3);
65 $this->assertEmpty($b->read(1));
66 $this->assertEquals($b->eof(), true);
67 $this->assertEquals($a->eof(), true);
68 $b->seek(0);
69 $this->assertEquals('foo', (string) $b);
70 $b->seek(0);
71 $this->assertEquals('foo', $b->getContents());
72 $this->assertEquals($a->getMetadata(), $b->getMetadata());
73 $b->seek(0, SEEK_END);
74 $b->write('bar');
75 $this->assertEquals('foobar', (string) $b);
76 $this->assertIsResource($b->detach());
77 $b->close();
87 return $a->read($len);
90 $this->assertEquals('foo', $b->read(3));
91 $this->assertTrue($called);