Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public function testRead() |
||
8 | { |
||
9 | $reader = new ServiceReader(array($this, 'read')); |
||
10 | |||
11 | $this->assertEquals(1, count($reader)); |
||
12 | $this->assertEquals(array('field1'), $reader->getFields()); |
||
13 | $this->assertEquals(array('field1'=>'123'), $reader->current()); |
||
14 | |||
15 | $actualData = array(); |
||
16 | $expectedData = array('key'=>array('field1'=>'123')); |
||
17 | foreach ($reader as $key=>$row) { |
||
18 | $actualData[$key] = $row; |
||
19 | } |
||
20 | $this->assertEquals($expectedData, $actualData); |
||
21 | } |
||
22 | |||
29 |