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