| Conditions | 2 |
| Paths | 2 |
| Total Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function testRun() { |
||
| 19 | $extension = $this->newExtension(); |
||
| 20 | |||
| 21 | $hookLists = [ |
||
| 22 | 'ParserFirstCallInit' => [], |
||
| 23 | 'ArticleInsertComplete' => [], |
||
| 24 | 'ArticleDeleteComplete' => [], |
||
| 25 | 'TitleMoveComplete' => [], |
||
| 26 | 'UnitTestsList' => [], |
||
| 27 | ]; |
||
| 28 | |||
| 29 | $setup = new Setup( |
||
| 30 | $extension, |
||
| 31 | $hookLists, |
||
| 32 | __DIR__ . '/..' |
||
| 33 | ); |
||
| 34 | |||
| 35 | $setup->run(); |
||
| 36 | |||
| 37 | foreach ( $hookLists as $hookName => $hookList ) { |
||
| 38 | $this->assertEquals( 1, count( $hookList ), "one hook handler need to be added to '$hookName'" ); |
||
| 39 | |||
| 40 | $hook = reset( $hookList ); |
||
| 41 | |||
| 42 | $this->assertInternalType( 'callable', $hook ); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | |||
| 51 |