diff --git a/core/modules/menu_link_content/src/Tests/LinksTest.php b/core/modules/menu_link_content/src/Tests/LinksTest.php index 29a8d9715ca8130ca5bf5dfb47cad388c105ae05..0c660e8686e16c3e8421594c111f0b994ecc457d 100644 --- a/core/modules/menu_link_content/src/Tests/LinksTest.php +++ b/core/modules/menu_link_content/src/Tests/LinksTest.php @@ -9,6 +9,7 @@ use Drupal\Component\Utility\SafeMarkup; use Drupal\simpletest\WebTestBase; +use Drupal\system\Entity\Menu; /** * Tests handling of menu links hierarchies. @@ -39,7 +40,7 @@ protected function setUp() { $this->menuLinkManager = \Drupal::service('plugin.manager.menu.link'); - entity_create('menu', array( + Menu::create(array( 'id' => 'menu_test', 'label' => 'Test menu', 'description' => 'Description text', diff --git a/core/modules/menu_ui/src/Tests/MenuCacheTagsTest.php b/core/modules/menu_ui/src/Tests/MenuCacheTagsTest.php index 520627ed797eebf7abe4dfc0355f92854f055239..5d9ce5ffde7017ff912d8bb0b7c5f4c140e357f7 100644 --- a/core/modules/menu_ui/src/Tests/MenuCacheTagsTest.php +++ b/core/modules/menu_ui/src/Tests/MenuCacheTagsTest.php @@ -9,6 +9,7 @@ use Drupal\Core\Url; use Drupal\system\Tests\Cache\PageCacheTagsTestBase; +use Drupal\system\Entity\Menu; /** * Tests the Menu and Menu Link entities' cache tags. @@ -32,7 +33,7 @@ public function testMenuBlock() { $url = Url::fromRoute('test_page_test.test_page'); // Create a Llama menu, add a link to it and place the corresponding block. - $menu = entity_create('menu', array( + $menu = Menu::create(array( 'id' => 'llama', 'label' => 'Llama', 'description' => 'Description text', diff --git a/core/modules/menu_ui/src/Tests/MenuTest.php b/core/modules/menu_ui/src/Tests/MenuTest.php index d88911ad3ee7270cdc88e04bf737ca030a2d4b49..d350ab62ae457fe91e976d41e22c45faf13f59e1 100644 --- a/core/modules/menu_ui/src/Tests/MenuTest.php +++ b/core/modules/menu_ui/src/Tests/MenuTest.php @@ -157,7 +157,7 @@ function addCustomMenuCRUD() { $menu_name = substr(hash('sha256', $this->randomMachineName(16)), 0, MENU_MAX_MENU_NAME_LENGTH_UI); $label = $this->randomMachineName(16); - $menu = entity_create('menu', array( + $menu = Menu::create(array( 'id' => $menu_name, 'label' => $label, 'description' => 'Description text', diff --git a/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php b/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php index e10a6af85698a3869c85d45cbd0d0e373138fab8..4e6db75bb2aabc5ad74b59045aa3e1f1d3deb5cc 100644 --- a/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php +++ b/core/modules/system/src/Tests/Block/SystemMenuBlockTest.php @@ -6,6 +6,8 @@ namespace Drupal\system\Tests\Block; +use Drupal\system\Entity\Menu; + use Drupal\Core\Render\Element; use Drupal\simpletest\KernelTestBase; use Drupal\system\Tests\Routing\MockRouteProvider; @@ -118,7 +120,7 @@ protected function setUp() { $menu_name = 'mock'; $label = $this->randomMachineName(16); - $this->menu = entity_create('menu', array( + $this->menu = Menu::create(array( 'id' => $menu_name, 'label' => $label, 'description' => 'Description text',