| @@ 42-49 (lines=8) @@ | ||
| 39 | /** |
|
| 40 | * Tests Hook::__construct |
|
| 41 | */ |
|
| 42 | public function testEmptyActions() |
|
| 43 | { |
|
| 44 | $hook = new Hook(); |
|
| 45 | $config = $hook->getJsonData(); |
|
| 46 | ||
| 47 | $this->assertEquals(0, count($hook->getActions())); |
|
| 48 | $this->assertEquals(0, count($config['actions'])); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Tests Hook::addAction |
|
| @@ 54-62 (lines=9) @@ | ||
| 51 | /** |
|
| 52 | * Tests Hook::addAction |
|
| 53 | */ |
|
| 54 | public function testAddAction() |
|
| 55 | { |
|
| 56 | $hook = new Hook(); |
|
| 57 | $hook->addAction(new Action('php', '\\Foo\\Bar')); |
|
| 58 | $config = $hook->getJsonData(); |
|
| 59 | ||
| 60 | $this->assertEquals(1, count($hook->getActions())); |
|
| 61 | $this->assertEquals(1, count($config['actions'])); |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||