class TestViewsLocalTask

Same name and namespace in other branches
  1. 11.x core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php \Drupal\Tests\views\Unit\Plugin\Derivative\TestViewsLocalTask

Replaces the applicable views call for easier testability.

Hierarchy

Expanded class hierarchy of TestViewsLocalTask

File

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

Namespace

Drupal\Tests\views\Unit\Plugin\Derivative
View source
class TestViewsLocalTask extends ViewsLocalTask {
  protected $result;
  
  /**
   * Sets applicable views result.
   */
  public function setApplicableMenuViews($result) {
    $this->result = $result;
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getApplicableMenuViews() {
    return $this->result;
  }

}

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