@@ 21-27 (lines=7) @@ | ||
18 | $this->registry = new Registry(); |
|
19 | } |
|
20 | ||
21 | public function testAddingHandlers() |
|
22 | { |
|
23 | $handler = $this->getMockForAbstractClass(HandlerInterface::class); |
|
24 | $this->registry->addHandler('some_handler', $handler); |
|
25 | ||
26 | $this->assertEquals($this->registry->getHandler('some_handler'), $handler); |
|
27 | } |
|
28 | ||
29 | public function testGettingHandlers() |
|
30 | { |
|
@@ 29-37 (lines=9) @@ | ||
26 | $this->assertEquals($this->registry->getHandler('some_handler'), $handler); |
|
27 | } |
|
28 | ||
29 | public function testGettingHandlers() |
|
30 | { |
|
31 | $handler = $this->getMockForAbstractClass(HandlerInterface::class); |
|
32 | $this->registry->addHandler('some_handler', $handler); |
|
33 | ||
34 | $returnedHandler = $this->registry->getHandler('some_handler'); |
|
35 | ||
36 | $this->assertSame($handler, $returnedHandler); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @expectedException \Netgen\Bundle\OpenGraphBundle\Exception\HandlerNotFoundException |