function MenuTreeParametersTest::testSetMinDepth

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

Tests setMinDepth().

@covers ::setMinDepth @dataProvider providerTestSetMinDepth

File

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

Class

MenuTreeParametersTest
Tests the menu link tree parameters value object.

Namespace

Drupal\Tests\Core\Menu

Code

public function testSetMinDepth($min_depth, $expected) : void {
    $parameters = new MenuTreeParameters();
    $parameters->setMinDepth($min_depth);
    $this->assertEquals($expected, $parameters->minDepth);
}

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