public function ViewsLocalTaskTest::testGetDerivativeDefinitionsWithoutHookMenuViews in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php \Drupal\Tests\views\Unit\Plugin\Derivative\ViewsLocalTaskTest::testGetDerivativeDefinitionsWithoutHookMenuViews()
- 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 65 - Contains \Drupal\Tests\views\Unit\Plugin\Derivative\ViewsLocalTaskTest.
Class
- ViewsLocalTaskTest
- @coversDefaultClass \Drupal\views\Plugin\Derivative\ViewsLocalTask @group views
Namespace
Drupal\Tests\views\Unit\Plugin\DerivativeCode
public function testGetDerivativeDefinitionsWithoutHookMenuViews() {
$result = [];
$this->localTaskDerivative
->setApplicableMenuViews($result);
$definitions = $this->localTaskDerivative
->getDerivativeDefinitions($this->baseDefinition);
$this
->assertEquals([], $definitions);
}