function InlineBlockUsageTest::testRemoveByLayoutEntity
Covers ::removeByLayoutEntity.
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ InlineBlockUsageTest.php, line 92
Class
- InlineBlockUsageTest
- Class for testing the InlineBlockUsage service.
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testRemoveByLayoutEntity() : void {
$this->inlineBlockUsage
->addUsage('1', $this->entity);
$this->inlineBlockUsage
->removeByLayoutEntity($this->entity);
$results = $this->database
->select('inline_block_usage')
->fields('inline_block_usage')
->condition('block_content_id', '1')
->isNull('layout_entity_id')
->isNull('layout_entity_type')
->execute()
->fetchAll();
$this->assertCount(1, $results);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.