You are here

public function LocalTaskDefaultTest::testActive in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php \Drupal\Tests\Core\Menu\LocalTaskDefaultTest::testActive()

@covers ::getActive @covers ::setActive

File

core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php, line 246
Contains \Drupal\Tests\Core\Menu\LocalTaskDefaultTest.

Class

LocalTaskDefaultTest
@coversDefaultClass \Drupal\Core\Menu\LocalTaskDefault @group Menu

Namespace

Drupal\Tests\Core\Menu

Code

public function testActive() {
  $this
    ->setupLocalTaskDefault();
  $this
    ->assertFalse($this->localTaskBase
    ->getActive());
  $this->localTaskBase
    ->setActive();
  $this
    ->assertTrue($this->localTaskBase
    ->getActive());
}