You are here

public function MigrateSearchPageTest::testUserSearchCreate in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php \Drupal\Tests\search\Kernel\Migrate\d7\MigrateSearchPageTest::testUserSearchCreate()
  2. 10 core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php \Drupal\Tests\search\Kernel\Migrate\d7\MigrateSearchPageTest::testUserSearchCreate()

Tests that a search page will be created if it does not exist.

File

core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php, line 96

Class

MigrateSearchPageTest
Tests migration of search page status and settings.

Namespace

Drupal\Tests\search\Kernel\Migrate\d7

Code

public function testUserSearchCreate() {
  $this
    ->enableModules([
    'node',
  ]);
  $this
    ->installConfig([
    'search',
  ]);

  /** @var \Drupal\search\Entity\SearchPage $search_page */
  $search_page = SearchPage::load('user_search');
  $search_page
    ->delete();
  $this
    ->executeMigration('d7_search_page');
  $this
    ->assertEntity('user_search', 'user');
}