function ViewsLocalTaskTest::testGetDerivativeDefinitionsWithoutHookMenuViews

Same name in other branches
  1. 9 core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php \Drupal\Tests\views\Unit\Plugin\Derivative\ViewsLocalTaskTest::testGetDerivativeDefinitionsWithoutHookMenuViews()
  2. 8.9.x core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php \Drupal\Tests\views\Unit\Plugin\Derivative\ViewsLocalTaskTest::testGetDerivativeDefinitionsWithoutHookMenuViews()
  3. 10 core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php \Drupal\Tests\views\Unit\Plugin\Derivative\ViewsLocalTaskTest::testGetDerivativeDefinitionsWithoutHookMenuViews()

Tests fetching the derivatives on no view with hook menu.

See also

\Drupal\views\Plugin\Derivative\ViewsLocalTask::getDerivativeDefinitions()

File

core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php, line 67

Class

ViewsLocalTaskTest
@coversDefaultClass \Drupal\views\Plugin\Derivative\ViewsLocalTask @group views

Namespace

Drupal\Tests\views\Unit\Plugin\Derivative

Code

public function testGetDerivativeDefinitionsWithoutHookMenuViews() : void {
    $result = [];
    $this->localTaskDerivative
        ->setApplicableMenuViews($result);
    $definitions = $this->localTaskDerivative
        ->getDerivativeDefinitions($this->baseDefinition);
    $this->assertEquals([], $definitions);
}

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