function MigrateSearchPageTest::testUserSearchCreate

Same name in other branches
  1. 9 core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php \Drupal\Tests\search\Kernel\Migrate\d7\MigrateSearchPageTest::testUserSearchCreate()
  2. 8.9.x core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php \Drupal\Tests\search\Kernel\Migrate\d7\MigrateSearchPageTest::testUserSearchCreate()
  3. 11.x 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 113

Class

MigrateSearchPageTest
Tests migration of search page status and settings.

Namespace

Drupal\Tests\search\Kernel\Migrate\d7

Code

public function testUserSearchCreate() : void {
    $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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.