You are here

public function TargetTest::testImplementsHook in Drupal 7 to 8/9 Module Upgrader 8

File

tests/src/Unit/TargetTest.php, line 79

Class

TargetTest
@group DMU

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit

Code

public function testImplementsHook() {
  $this->indexer
    ->method('has')
    ->willReturnMap([
    [
      'hook_permission',
      TRUE,
    ],
    [
      'hook_menu_alter',
      FALSE,
    ],
  ]);
  $this
    ->assertTrue($this->target
    ->implementsHook('permission'));
  $this
    ->assertFalse($this->target
    ->implementsHook('menu_alter'));
}