function MenuTreeParametersTest::testOnlyEnabledLinks

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php \Drupal\Tests\Core\Menu\MenuTreeParametersTest::testOnlyEnabledLinks()
  2. 8.9.x core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php \Drupal\Tests\Core\Menu\MenuTreeParametersTest::testOnlyEnabledLinks()
  3. 10 core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php \Drupal\Tests\Core\Menu\MenuTreeParametersTest::testOnlyEnabledLinks()

Tests onlyEnabledLinks().

@covers ::onlyEnabledLinks

File

core/tests/Drupal/Tests/Core/Menu/MenuTreeParametersTest.php, line 119

Class

MenuTreeParametersTest
Tests the menu link tree parameters value object.

Namespace

Drupal\Tests\Core\Menu

Code

public function testOnlyEnabledLinks() : void {
    $parameters = new MenuTreeParameters();
    $parameters->onlyEnabledLinks();
    $this->assertEquals(1, $parameters->conditions['enabled']);
}

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