Commit 2a1c93a2 authored by catch's avatar catch

Issue #2641612 by Mac_Weber, heykarthikwithu: Replace deprecated usage of ...

Issue #2641612 by Mac_Weber, heykarthikwithu: Replace deprecated usage of  entity_create('search_page') with a direct call to SearchPage::create()
parent a67f54c0
......@@ -9,6 +9,7 @@
use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
use Drupal\image\Entity\ImageStyle;
use Drupal\search\Entity\SearchPage;
use Drupal\simpletest\WebTestBase;
use Drupal\system\Entity\Action;
......@@ -160,10 +161,10 @@ protected function doImageStyleUpdate() {
protected function doSearchPageUpdate() {
// Create a test search page with a known label.
$name = 'search.page.apple';
$entity = entity_create('search_page', array(
$entity = SearchPage::create([
'id' => 'apple',
'plugin' => 'search_extra_type_search',
));
]);
$entity->save();
$this->checkSinglePluginConfigSync($entity, 'configuration', 'boost', 'bi');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment