protected function MenuResourceTestBase::createEntity in Drupal 8
Same name and namespace in other branches
- 9 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;
}