function InlineBlockTestBase::getLatestBlockEntityId
Same name in other branches
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::getLatestBlockEntityId()
- 10 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::getLatestBlockEntityId()
- 11.x core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockTestBase::getLatestBlockEntityId()
Gets the latest block entity id.
2 calls to InlineBlockTestBase::getLatestBlockEntityId()
- InlineBlockTest::testAccess in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTest.php - Tests access to the block edit form of inline blocks.
- InlineBlockTest::testDeletion in core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTest.php - Tests that entity blocks deleted correctly.
File
-
core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ InlineBlockTestBase.php, line 99
Class
- InlineBlockTestBase
- Base class for testing inline blocks.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function getLatestBlockEntityId() {
$block_ids = \Drupal::entityQuery('block_content')->sort('id', 'DESC')
->range(0, 1)
->execute();
$block_id = array_pop($block_ids);
$this->assertNotEmpty($this->blockStorage
->load($block_id));
return $block_id;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.