Lines Matching refs:this

18         $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface')
20 $s->expects($this->once())
22 ->will($this->returnValue(true));
29 $this->assertFalse($a->seek(100, SEEK_CUR));
35 $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface')
37 $s->expects($this->once())
39 ->will($this->returnValue(true));
40 $s->expects($this->once())
42 ->will($this->returnValue(true));
43 $s->expects($this->once())
45 ->will($this->returnValue(false));
47 $this->assertFalse($a->seek(10));
58 $this->assertTrue($a->seek(3));
59 $this->assertEquals(3, $a->tell());
60 $this->assertEquals('bar', $a->read(3));
62 $this->assertEquals(6, $a->tell());
63 $this->assertEquals('baz', $a->read(3));
71 $this->assertSame('foofoo', (string) $a);
73 $this->assertSame('', (string) $a);
74 $this->assertSame(0, $a->getSize());
82 $this->assertSame('', (string) $a);
88 $this->assertFalse($a->isWritable());
89 $this->assertTrue($a->isSeekable());
90 $this->assertTrue($a->isReadable());
91 $this->assertFalse($a->write('foo'));
97 $this->assertEquals('', (string) $a);
107 $this->assertFalse($a->eof());
108 $this->assertSame(0, $a->tell());
109 $this->assertEquals('foo', $a->read(3));
110 $this->assertEquals('bar', $a->read(3));
111 $this->assertEquals('baz', $a->read(3));
112 $this->assertEmpty($a->read(1));
113 $this->assertTrue($a->eof());
114 $this->assertSame(9, $a->tell());
115 $this->assertEquals('foobarbaz', (string) $a);
124 $this->assertEquals(6, $a->getSize());
126 $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface')
128 $s->expects($this->once())
130 ->will($this->returnValue(null));
131 $s->expects($this->once())
133 ->will($this->returnValue(true));
135 $this->assertNull($a->getSize());
140 $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface')
142 $s->expects($this->once())
144 ->will($this->throwException(new \RuntimeException('foo')));
145 $s->expects($this->once())
147 ->will($this->returnValue(true));
148 $s->expects($this->any())
150 ->will($this->returnValue(false));
152 $this->assertFalse($a->eof());
153 $this->assertSame('', (string) $a);
168 $this->assertEquals([], $s->getMetadata());
169 $this->assertNull($s->getMetadata('foo'));
175 $this->expectException(CannotAttachException::class);