function InlineBlockTest::assertNodeRevisionContent

Same name in other branches
  1. 9 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTest::assertNodeRevisionContent()
  2. 11.x core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTest::assertNodeRevisionContent()

Assert the contents of a node revision.

@internal

Parameters

int $revision_id: The revision ID to assert.

array $content: The content items to assert on the page.

1 call to InlineBlockTest::assertNodeRevisionContent()
InlineBlockTest::testInlineBlocksRevisioningIntegrity in core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php
Tests entity blocks revisioning.

File

core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php, line 332

Class

InlineBlockTest
Tests that the inline block feature works correctly.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function assertNodeRevisionContent(int $revision_id, array $content) : void {
    $this->drupalGet("node/1/revisions/{$revision_id}/view");
    foreach ($content as $content_item) {
        $this->assertSession()
            ->pageTextContains($content_item);
    }
}

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