diff --git a/core/modules/menu_link/tests/Drupal/menu_link/Tests/MenuTreeTest.php b/core/modules/menu_link/tests/Drupal/menu_link/Tests/MenuTreeTest.php index 17f1b94..901a8d7 100644 --- a/core/modules/menu_link/tests/Drupal/menu_link/Tests/MenuTreeTest.php +++ b/core/modules/menu_link/tests/Drupal/menu_link/Tests/MenuTreeTest.php @@ -9,9 +9,16 @@ use Drupal\menu_link\MenuTree; use Drupal\Tests\UnitTestCase; -use PHPUnit_Framework_Constraint_IsEqual; use Symfony\Component\HttpFoundation\RequestStack; +/** + * Tests the menu tree. + * + * @group Drupal + * @group menu_link + * + * @coversDefaultClass \Drupal\menu_link\MenuTree + */ class MenuTreeTest extends UnitTestCase { /** @@ -51,6 +58,17 @@ class MenuTreeTest extends UnitTestCase { /** * {@inheritdoc} */ + public static function getInfo() { + return array( + 'name' => 'Tests \Drupal\menu_link\MenuTree', + 'description' => '', + 'group' => 'Menu', + ); + } + + /** + * {@inheritdoc} + */ protected function setUp() { $this->connection = $this->getMockBuilder('Drupal\Core\Database\Connection') ->disableOriginalConstructor() @@ -69,6 +87,9 @@ protected function setUp() { /** * Tests active paths. + * + * @covers ::setPath + * @covers ::getPath */ public function testActivePaths() { $this->assertNull($this->menuTree->getPath('test_menu1')); @@ -84,6 +105,9 @@ public function testActivePaths() { /** * Tests buildTreeData with a single level. + * + * @covers ::buildTreeData + * @covers ::doBuildTreeData */ public function testBuildTreeDataWithSingleLevel() { $items = array(); @@ -107,6 +131,9 @@ public function testBuildTreeDataWithSingleLevel() { /** * Tests buildTreeData with a single level and one item being active. + * + * @covers ::buildTreeData + * @covers ::doBuildTreeData */ public function testBuildTreeDataWithSingleLevelAndActiveItem() { $items = array(); @@ -130,6 +157,9 @@ public function testBuildTreeDataWithSingleLevelAndActiveItem() { /** * Tests buildTreeData with a single level and none item being active. + * + * @covers ::buildTreeData + * @covers ::doBuildTreeData */ public function testBuildTreeDataWithSingleLevelAndNoActiveItem() { $items = array(); @@ -153,6 +183,9 @@ public function testBuildTreeDataWithSingleLevelAndNoActiveItem() { /** * Tests buildTreeData with multiple levels. + * + * @covers ::buildTreeData + * @covers ::doBuildTreeData */ public function testBuildTreeDataWithMultipleLevels() { $items = array(); @@ -176,6 +209,9 @@ public function testBuildTreeDataWithMultipleLevels() { /** * Tests buildTreeData with a more complex example. + * + * @covers ::buildTreeData + * @covers ::doBuildTreeData */ public function testBuildTreeWithComplexData() { $items = array( @@ -199,6 +235,8 @@ public function testBuildTreeWithComplexData() { /** * Tests the output with a single level. + * + * @covers ::output */ public function testOutputWithSingleLevel() { $tree = array( @@ -222,6 +260,8 @@ public function testOutputWithSingleLevel() { /** * Tests the output method with a complex example. + * + * @covers ::output */ public function testOutputWithComplexData() { $tree = array( @@ -257,6 +297,8 @@ public function testOutputWithComplexData() { /** * Tests menu tree access check with a single level. + * + * @covers ::checkAccess */ public function testCheckAccessWithSingleLevel() { $items = array(