function BookMultilingualTest::assertBookItemIsCorrectlyTranslated

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.

@internal

Parameters

array $item: A book tree item.

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

File

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

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);
}

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