| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | public function testGetData() |
||
| 17 | { |
||
| 18 | // arrange |
||
| 19 | $jsonDecoder = new JSONDecoder(); |
||
| 20 | $json = <<<JSON |
||
| 21 | { |
||
| 22 | "foo": "bar", |
||
| 23 | "key": "value", |
||
| 24 | "multi": {"is": true} |
||
| 25 | } |
||
| 26 | JSON; |
||
| 27 | $data = array( |
||
| 28 | 'foo' => 'bar', |
||
| 29 | 'key' => 'value', |
||
| 30 | 'multi' => array('is' => true) |
||
| 31 | ); |
||
| 32 | |||
| 33 | // act |
||
| 34 | $decodedJSONData = $jsonDecoder->getData($json); |
||
| 35 | |||
| 36 | // assert |
||
| 37 | $this->assertEquals($decodedJSONData, $data); |
||
| 38 | } |
||
| 39 | |||
| 61 |