Unverified Commit a3223117 authored by larowlan's avatar larowlan

Issue #2549789 by Jo Fitzgerald, Jaesin, rajeshwari10, googletorp: Remove...

Issue #2549789 by Jo Fitzgerald, Jaesin, rajeshwari10, googletorp: Remove entity_load* usage for block_content entity type
parent 2225b0af
......@@ -63,7 +63,9 @@ public function testBlockContentCreation() {
$this->assertNoFieldByXPath('//select[@name="settings[view_mode]"]', NULL, 'View mode setting hidden because only one exists');
// Check that the block exists in the database.
$blocks = entity_load_multiple_by_properties('block_content', ['info' => $edit['info[0][value]']]);
$blocks = \Drupal::entityTypeManager()
->getStorage('block_content')
->loadByProperties(['info' => $edit['info[0][value]']]);
$block = reset($blocks);
$this->assertTrue($block, 'Custom Block found in database.');
......@@ -143,7 +145,9 @@ public function testBlockContentCreationMultipleViewModes() {
$this->assertFieldByXPath('//select[@name="settings[view_mode]"]/option[@selected="selected"]', 'test_view_mode', 'View mode changed to Test View Mode');
// Check that the block exists in the database.
$blocks = entity_load_multiple_by_properties('block_content', ['info' => $edit['info[0][value]']]);
$blocks = \Drupal::entityTypeManager()
->getStorage('block_content')
->loadByProperties(['info' => $edit['info[0][value]']]);
$block = reset($blocks);
$this->assertTrue($block, 'Custom Block found in database.');
......@@ -178,7 +182,9 @@ public function testDefaultBlockContentCreation() {
]), 'Basic block created.');
// Check that the block exists in the database.
$blocks = entity_load_multiple_by_properties('block_content', ['info' => $edit['info[0][value]']]);
$blocks = \Drupal::entityTypeManager()
->getStorage('block_content')
->loadByProperties(['info' => $edit['info[0][value]']]);
$block = reset($blocks);
$this->assertTrue($block, 'Default Custom Block found in database.');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment