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