| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function testSetGroupsFailsWithInvalidSerializer() |
||
| 26 | { |
||
| 27 | $callback = new Callback(); |
||
| 28 | $serializer = $this->getMockBuilder('FakeSerializer')->setMethods(array('serialize'))->getMock(); |
||
| 29 | $callback->setSerializer($serializer); |
||
| 30 | |||
| 31 | $this->setExpectedException( |
||
| 32 | 'RuntimeException', |
||
| 33 | 'Setting serialization groups requires using "JMS\Serializer\Serializer" or ' |
||
| 34 | . '"Symfony\Component\Serializer\Serializer"' |
||
| 35 | ); |
||
| 36 | |||
| 37 | $callback->setGroups(array('foo')); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |