12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace Predis\Protocol\Text;
- use PredisTestCase;
- class StreamableMultiBulkResponseTest extends PredisTestCase
- {
-
- public function testOk()
- {
- $handler = new Handler\StreamableMultiBulkResponse();
- $connection = $this->getMock('Predis\Connection\CompositeConnectionInterface');
- $connection->expects($this->never())->method('readLine');
- $connection->expects($this->never())->method('readBuffer');
- $this->assertInstanceOf('Predis\Response\Iterator\MultiBulk', $handler->handle($connection, '1'));
- }
-
- public function testInvalid()
- {
- $handler = new Handler\StreamableMultiBulkResponse();
- $connection = $this->getMock('Predis\Connection\CompositeConnectionInterface');
- $connection->expects($this->never())->method('readLine');
- $connection->expects($this->never())->method('readBuffer');
- $handler->handle($connection, 'invalid');
- }
- }
|