function 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 73

Class

ViewsHandlerManagerTest
Tests the ViewsHandlerManager class.

Namespace

Drupal\Tests\views\Unit

Code

public function testAlterHookInvocation() : void {
  $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.