public function testConvertsToStringAndSeeksToByteZero()
 {
     $response = new tubepress_http_impl_puzzle_PuzzleBasedResponse(new puzzle_message_Response(200));
     $s = new tubepress_http_impl_puzzle_streams_PuzzleBasedStream(puzzle_stream_Stream::factory('foo'));
     $s->read(1);
     $response->setBody($s);
     $this->assertEquals("HTTP/1.1 200 OK\r\n\r\nfoo", (string) $response);
 }
Exemplo n.º 2
0
 public function testRead()
 {
     $this->_mockDelegate->shouldReceive('read')->once()->with(44)->andReturn('xyz');
     $this->assertEquals('xyz', $this->_sut->read(44));
 }