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