function SearchUpdateTest::testSearchHelpInstall

Same name and namespace in other branches
  1. 11.x core/modules/search/tests/src/Functional/Update/SearchUpdateTest.php \Drupal\Tests\search\Functional\Update\SearchUpdateTest::testSearchHelpInstall()

Tests system_update_11401.

See also

system_update_11401()

File

core/modules/search/tests/src/Functional/Update/SearchUpdateTest.php, line 38

Class

SearchUpdateTest
Tests moving search from node to search_node.

Namespace

Drupal\Tests\search\Functional\Update

Code

public function testSearchHelpInstall() : void {
  $this->assertFalse(\Drupal::moduleHandler()->moduleExists('search_node'));
  $this->runUpdates();
  $this->assertTrue(\Drupal::moduleHandler()->moduleExists('search_node'));
  $nodeSearchPage = $this->container
    ->get(EntityTypeManagerInterface::class)
    ->getStorage('search_page')
    ->load('node_search');
  $this->assertSame([
    'search_node',
  ], $nodeSearchPage->toArray()['dependencies']['module']);
}

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