function BookManagerTest::testGetBookParents

Same name and namespace in other branches
  1. 9 core/modules/book/tests/src/Unit/BookManagerTest.php \Drupal\Tests\book\Unit\BookManagerTest::testGetBookParents()
  2. 8.9.x core/modules/book/tests/src/Unit/BookManagerTest.php \Drupal\Tests\book\Unit\BookManagerTest::testGetBookParents()
  3. 10 core/modules/book/tests/src/Unit/BookManagerTest.php \Drupal\Tests\book\Unit\BookManagerTest::testGetBookParents()

Tests the getBookParents() method.

@dataProvider providerTestGetBookParents

File

core/modules/book/tests/src/Unit/BookManagerTest.php, line 97

Class

BookManagerTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21book%21src%21BookManager.php/class/BookManager/11.x" title="Defines a book manager." class="local">\Drupal\book\BookManager</a> @group book

Namespace

Drupal\Tests\book\Unit

Code

public function testGetBookParents($book, $parent, $expected) {
    $this->assertEquals($expected, $this->bookManager
        ->getBookParents($book, $parent));
}

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