function InlineBlockUsageTest::testGetUsage
Covers ::getUsage.
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ InlineBlockUsageTest.php, line 124
Class
- InlineBlockUsageTest
- Class for testing the InlineBlockUsage service.
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testGetUsage() : void {
$this->inlineBlockUsage
->addUsage('1', $this->entity);
$result = $this->inlineBlockUsage
->getUsage('1');
$this->assertEquals($this->entity
->id(), $result->layout_entity_id);
$this->assertEquals($this->entity
->getEntityTypeId(), $result->layout_entity_type);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.