You are here

public function MenuTreeParametersTest::testSetMinDepth in Drupal 9

Same name and namespace in other branches
  1. 8 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 47

Class

MenuTreeParametersTest
Tests the menu link tree parameters value object.

Namespace

Drupal\Tests\Core\Menu

Code

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