| @@ 32-39 (lines=8) @@ | ||
| 29 | $this->assertSame('value', call_user_func($handlers->getHandler(\DateTime::class))); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function testInterface() |
|
| 33 | { |
|
| 34 | $hydrators = new FallbackHydratorContainer(); |
|
| 35 | $hydrators->add(TypeInterface::class, function() { return 'type'; }); |
|
| 36 | ||
| 37 | $this->assertSame('type', call_user_func($hydrators->getHandler(TypeA::class))); |
|
| 38 | $this->assertSame('type', call_user_func($hydrators->getHandler(TypeB::class))); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testInheritance() |
|
| 42 | { |
|
| @@ 32-39 (lines=8) @@ | ||
| 29 | $this->assertSame('value', call_user_func($normalizers->getHandler(\DateTime::class))); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function testInterface() |
|
| 33 | { |
|
| 34 | $normalizers = new FallbackNormalizerContainer(); |
|
| 35 | $normalizers->add(TypeInterface::class, function() { return 'type'; }); |
|
| 36 | ||
| 37 | $this->assertSame('type', call_user_func($normalizers->getHandler(TypeA::class))); |
|
| 38 | $this->assertSame('type', call_user_func($normalizers->getHandler(TypeB::class))); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testInheritance() |
|
| 42 | { |
|