function LocalTaskDefaultTest::testActive

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php \Drupal\Tests\Core\Menu\LocalTaskDefaultTest::testActive()
  2. 8.9.x core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php \Drupal\Tests\Core\Menu\LocalTaskDefaultTest::testActive()
  3. 10 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

Class

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

Namespace

Drupal\Tests\Core\Menu

Code

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

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