function InlineBlockTest::assertBlockRevisionCountByTitle

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

Assert the number of block content revisions by the block title.

@internal

Parameters

string $block_title: The block title.

int $expected_revision_count: The revision count.

1 call to InlineBlockTest::assertBlockRevisionCountByTitle()
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 349

Class

InlineBlockTest
Tests that the inline block feature works correctly.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function assertBlockRevisionCountByTitle(string $block_title, int $expected_revision_count) : void {
    $actual_revision_count = $this->blockStorage
        ->getQuery()
        ->accessCheck(FALSE)
        ->condition('info', $block_title)
        ->allRevisions()
        ->count()
        ->execute();
    $this->assertEquals($actual_revision_count, $expected_revision_count);
}

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