Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / block_content / tests / src / Functional / BlockContentCreationTest.php
index 562a4bd102ff067c2fe3e2f31e1dfb924c4bc95a..0f89b86e6a237149f01e523e09380461a839b56b 100644 (file)
@@ -63,7 +63,9 @@ class BlockContentCreationTest extends BlockContentTestBase {
     $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 @@ class BlockContentCreationTest extends BlockContentTestBase {
     $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 @@ class BlockContentCreationTest extends BlockContentTestBase {
     ]), '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.');
   }