$this->localTaskDerivative =
new TestViewsLocalTask($this->routeProvider,
$this->state,
$this->viewStorage
);
} /**
* Tests fetching the derivatives on no view with hook menu.
*
* @see \Drupal\views\Plugin\Derivative\ViewsLocalTask::getDerivativeDefinitions()
*/
public function testGetDerivativeDefinitionsWithoutHookMenuViews() { $result =
[];
$this->localTaskDerivative->
setApplicableMenuViews($result);
$definitions =
$this->localTaskDerivative->
getDerivativeDefinitions($this->baseDefinition
);
$this->
assertEquals([],
$definitions);
} /**
* Tests fetching the derivatives on a view with without a local task.
*/
public function testGetDerivativeDefinitionsWithoutLocalTask() { $executable =
$this->
getMockBuilder('Drupal\views\ViewExecutable'
) ->
disableOriginalConstructor()