You are here

protected function BookMultilingualTest::assertBookItemIsCorrectlyTranslated in Drupal 9

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

Asserts a book item is correctly translated.

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 293

Class

BookMultilingualTest
Tests multilingual books.

Namespace

Drupal\Tests\book\Kernel

Code

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