function BookMultilingualTest::assertBookItemIsCorrectlyTranslated

Same name in other branches
  1. 9 core/modules/book/tests/src/Kernel/BookMultilingualTest.php \Drupal\Tests\book\Kernel\BookMultilingualTest::assertBookItemIsCorrectlyTranslated()
  2. 10 core/modules/book/tests/src/Kernel/BookMultilingualTest.php \Drupal\Tests\book\Kernel\BookMultilingualTest::assertBookItemIsCorrectlyTranslated()

Asserts a book item is correctly translated.

@internal

Parameters

array $item: A book tree item.

string $langcode: The language code for the requested translation.

1 call to BookMultilingualTest::assertBookItemIsCorrectlyTranslated()
BookMultilingualTest::testMultilingualBookManager in core/modules/book/tests/src/Kernel/BookMultilingualTest.php
Tests various book manager methods return correct translations.

File

core/modules/book/tests/src/Kernel/BookMultilingualTest.php, line 298

Class

BookMultilingualTest
Tests multilingual books.

Namespace

Drupal\Tests\book\Kernel

Code

protected function assertBookItemIsCorrectlyTranslated(array $item, string $langcode) : void {
    $this->assertNodeLinkIsCorrectlyTranslated((int) $item['original_link']['nid'], $item['title'], $item['url'], $langcode);
}

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