| 1 | <?php |
||
| 13 | class JsonEncoderTest extends AbstractEncoderTest |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Returns the encoder to be tested. |
||
| 17 | * @return \Vectorface\SnappyRouter\Encoder\AbstractEncoder Returns an instance of an encoder. |
||
| 18 | */ |
||
| 19 | public function getEncoder() |
||
| 23 | |||
| 24 | /** |
||
| 25 | * A data provider for the testEncode method. |
||
| 26 | */ |
||
| 27 | public function encodeProvider() |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Tests that we get an exception if we attempt to encode something that |
||
| 57 | * is not serializable as JSON. |
||
| 58 | * @expectedException Vectorface\SnappyRouter\Exception\EncoderException |
||
| 59 | * @expectedExceptionMessage Unable to encode response as JSON. |
||
| 60 | */ |
||
| 61 | public function testNonSerializableEncode() |
||
| 67 | |||
| 68 | public function jsonSerialize() |
||
| 72 | } |
||
| 73 |