You are here

protected function LayoutBuilderInlineBlockStubCleanupTest::addInlineBlockUsage in Acquia Content Hub 8.2

Add a row into table with the given entity id.

Parameters

int $block_id: Block content id.

Throws

\Exception

1 call to LayoutBuilderInlineBlockStubCleanupTest::addInlineBlockUsage()
LayoutBuilderInlineBlockStubCleanupTest::testLayoutBuilderInlineBlockStubCleanup in tests/src/Kernel/EventSubscriber/CleanUpStubs/LayoutBuilderInlineBlockStubCleanupTest.php
Tests LayoutBuilderInlineBlockStubCleanup event subscriber.

File

tests/src/Kernel/EventSubscriber/CleanUpStubs/LayoutBuilderInlineBlockStubCleanupTest.php, line 101

Class

LayoutBuilderInlineBlockStubCleanupTest
Test that LB inline block is handled correctly in CLEANUP_STUBS event.

Namespace

Drupal\Tests\acquia_contenthub\Kernel\EventSubscriber\CleanUpStubs

Code

protected function addInlineBlockUsage($block_id) {
  \Drupal::database()
    ->insert('inline_block_usage')
    ->fields([
    'block_content_id' => $block_id,
    'layout_entity_type' => 'node',
    'layout_entity_id' => 1,
  ])
    ->execute();
}