| 1 | <?php |
||
| 9 | class RowsWithKeyWithLobTest extends DataLayerTestCase |
||
| 10 | { |
||
| 11 | //-------------------------------------------------------------------------------------------------------------------- |
||
| 12 | /** |
||
| 13 | * Stored routine with designation type rows_with_key must return multi dimensional array. |
||
| 14 | */ |
||
| 15 | public function test1() |
||
| 16 | { |
||
| 17 | $rows = $this->dataLayer->tstTestRowsWithKey1WithLob(100, 'blob'); |
||
| 18 | self::assertIsArray($rows); |
||
| 19 | self::assertCount(1, $rows); |
||
| 20 | |||
| 21 | self::assertArrayHasKey('a', $rows); |
||
| 22 | self::assertArrayHasKey('b', $rows['a']); |
||
| 23 | |||
| 24 | self::assertNotCount(0, $rows['a']['b']); |
||
| 25 | |||
| 26 | self::assertArrayHasKey('c1', $rows['a']['b']); |
||
| 27 | |||
| 28 | self::assertNotCount(0, $rows['a']['b']['c1']); |
||
| 29 | } |
||
| 30 | |||
| 31 | //-------------------------------------------------------------------------------------------------------------------- |
||
| 32 | /** |
||
| 33 | * Stored routine with designation type rows_with_key must return empty array when no rwos are selected. |
||
| 34 | */ |
||
| 35 | public function test2() |
||
| 36 | { |
||
| 37 | $rows = $this->dataLayer->tstTestRowsWithKey1WithLob(0, 'blob'); |
||
| 38 | self::assertIsArray($rows); |
||
| 39 | self::assertCount(0, $rows); |
||
| 40 | |||
| 41 | } |
||
| 42 | |||
| 43 | //-------------------------------------------------------------------------------------------------------------------- |
||
| 44 | } |
||
| 45 | |||
| 48 |