| @@ 52-60 (lines=9) @@ | ||
| 49 | $this->assertSame('ancestor', call_user_func($hydrators->getHandler(FakeUser::class))); |
|
| 50 | } |
|
| 51 | ||
| 52 | public function testMultipleInterfacesException() |
|
| 53 | { |
|
| 54 | $hydrators = new FallbackHydratorContainer(); |
|
| 55 | $hydrators->add(TypeInterface::class, function() { return 'multiple'; }); |
|
| 56 | $hydrators->add(AnotherTypeInterface::class, function() { return 'multiple'; }); |
|
| 57 | ||
| 58 | $this->expectExceptionClass(HydratorConflictException::class); |
|
| 59 | $hydrators->getHandler(TypeMultiple::class); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function testInvalidClassOrInterfaceName() |
|
| 63 | { |
|
| @@ 52-60 (lines=9) @@ | ||
| 49 | $this->assertSame('ancestor', call_user_func($normalizers->getHandler(FakeUser::class))); |
|
| 50 | } |
|
| 51 | ||
| 52 | public function testMultipleInterfacesException() |
|
| 53 | { |
|
| 54 | $normalizers = new FallbackNormalizerContainer(); |
|
| 55 | $normalizers->add(TypeInterface::class, function() { return 'multiple'; }); |
|
| 56 | $normalizers->add(AnotherTypeInterface::class, function() { return 'multiple'; }); |
|
| 57 | ||
| 58 | $this->expectExceptionClass(NormalizerConflictException::class); |
|
| 59 | $normalizers->getHandler(TypeMultiple::class); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function testNoDefaultHandler() |
|
| 63 | { |
|