You are here

public function ViewsHandlerManagerTest::testAlterHookInvocation in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php \Drupal\Tests\views\Unit\ViewsHandlerManagerTest::testAlterHookInvocation()
  2. 10 core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php \Drupal\Tests\views\Unit\ViewsHandlerManagerTest::testAlterHookInvocation()

Tests that hook_views_plugins_TYPE_alter() is invoked for a handler type.

@covers ::__construct @covers ::getDefinitions

File

core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php, line 72

Class

ViewsHandlerManagerTest
Tests the ViewsHandlerManager class.

Namespace

Drupal\Tests\views\Unit

Code

public function testAlterHookInvocation() {
  $this->moduleHandler
    ->expects($this
    ->once())
    ->method('alter')
    ->with('views_plugins_test', []);
  $this->handlerManager
    ->getDefinitions();
}