class HelpNoSearchUpgradeTest

Same name and namespace in other branches
  1. 11.x core/modules/help/tests/src/Functional/HelpNoSearchUpgradeTest.php \Drupal\Tests\help\Functional\HelpNoSearchUpgradeTest

Tests that the search_help module is not installed after help updates.

Attributes

#[Group('help')] #[RunTestsInSeparateProcesses]

Hierarchy

Expanded class hierarchy of HelpNoSearchUpgradeTest

File

core/modules/help/tests/src/Functional/HelpNoSearchUpgradeTest.php, line 14

Namespace

Drupal\Tests\help\Functional
View source
class HelpNoSearchUpgradeTest extends UpdatePathTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * {@inheritdoc}
   */
  protected function setDatabaseDumpFiles() : void {
    $this->databaseDumpFiles = [
      __DIR__ . '/../../../../system/tests/fixtures/update/drupal-11.3.0.bare.standard.php.gz',
      __DIR__ . '/../../../../system/tests/fixtures/update/install-mysqli.php',
      __DIR__ . '/../../fixtures/uninstall-search.php',
    ];
  }
  
  /**
   * Tests system_update_11400().
   *
   * @see system_update_11400()
   */
  public function testSearchHelpInstall() : void {
    $this->assertFalse(\Drupal::moduleHandler()->moduleExists('search_help'));
    $this->assertTrue(\Drupal::database()->schema()
      ->tableExists('help_search_items'));
    $this->runUpdates();
    $this->assertFalse(\Drupal::moduleHandler()->moduleExists('search_help'));
    $this->assertFalse(\Drupal::database()->schema()
      ->tableExists('help_search_items'));
  }

}

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