protected function MenuResourceTestBase::createEntity in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Rest/MenuResourceTestBase.php \Drupal\Tests\system\Functional\Rest\MenuResourceTestBase::createEntity()
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityResourceTestBase::createEntity
File
- core/
modules/ system/ tests/ src/ Functional/ Rest/ MenuResourceTestBase.php, line 35
Class
Namespace
Drupal\Tests\system\Functional\RestCode
protected function createEntity() {
$menu = Menu::create([
'id' => 'menu',
'label' => 'Menu',
'description' => 'Menu',
]);
$menu
->save();
return $menu;
}