protected function SearchPageTest::createEntity in JSON:API 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/SearchPageTest.php \Drupal\Tests\jsonapi\Functional\SearchPageTest::createEntity()
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides ResourceTestBase::createEntity
File
- tests/
src/ Functional/ SearchPageTest.php, line 57
Class
- SearchPageTest
- JSON API integration test for the "SearchPage" config entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function createEntity() {
$search_page = SearchPage::create([
'id' => 'hinode_search',
'plugin' => 'node_search',
'label' => 'Search of magnetic activity of the Sun',
'path' => 'sun',
]);
$search_page
->save();
return $search_page;
}