function ViewsHandlerManagerTest::testAlterHookInvocation

Same name in other branches
  1. 8.9.x 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()
  3. 11.x 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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.