| Total Complexity | 4 |
| Total Lines | 89 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 10 | class StreamTest extends TestCase |
||
| 11 | { |
||
| 12 | private $client; |
||
| 13 | |||
| 14 | private const TEST_NAME_STREAM = 'test_stream'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * setUp |
||
| 18 | * |
||
| 19 | * @return void |
||
| 20 | */ |
||
| 21 | public function setUp() : void |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Read empty stream |
||
| 28 | * |
||
| 29 | * @throws \Exception |
||
| 30 | * |
||
| 31 | * @return void |
||
| 32 | */ |
||
| 33 | public function testReadEmptyStream() : void |
||
| 34 | { |
||
| 35 | $this->client->shouldReceive('rawCommand')->andReturn([]); |
||
| 36 | |||
| 37 | $stream = new Stream($this->client, self::TEST_NAME_STREAM); |
||
| 38 | |||
| 39 | $collection = $stream->get(); |
||
| 40 | |||
| 41 | $this->assertEquals(new Collection, $collection); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Add data to stream |
||
| 46 | * |
||
| 47 | * @throws \Exception |
||
| 48 | * |
||
| 49 | * @return void |
||
| 50 | */ |
||
| 51 | public function testAddDataToStream() : void |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Read empty stream |
||
| 72 | * |
||
| 73 | * @throws \Exception |
||
| 74 | * |
||
| 75 | * @return void |
||
| 76 | */ |
||
| 77 | public function testReadStream() : void |
||
| 101 | } |