You are here

protected function InlineBlockTest::assertBlockRevisionCountByTitle in Drupal 9

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

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 335

Class

InlineBlockTest
Tests that the inline block feature works correctly.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

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