function HelpTopicsUninstall::testHelpTopicsMerge
Same name in other branches
- 10 core/modules/help/tests/src/Functional/Update/HelpTopicsUninstall.php \Drupal\Tests\help\Functional\Update\HelpTopicsUninstall::testHelpTopicsMerge()
Tests upgrading help module for help topics.
See also
\help_post_update_help_topics_search()
\help_post_update_help_topics_uninstall()
File
-
core/
modules/ help/ tests/ src/ Functional/ Update/ HelpTopicsUninstall.php, line 39
Class
- HelpTopicsUninstall
- Tests merging help topics module when the module is enabled.
Namespace
Drupal\Tests\help\Functional\UpdateCode
public function testHelpTopicsMerge() {
$module_handler = \Drupal::moduleHandler();
$this->assertTrue($module_handler->moduleExists('help'));
$this->assertTrue($module_handler->moduleExists('help_topics'));
$this->assertTrue($module_handler->moduleExists('search'));
$this->assertFalse(\Drupal::database()->schema()
->tableExists('help_search_items'));
$dependencies = $this->config('search.page.help_search')
->get('dependencies.module');
$this->assertTrue(in_array('help_topics', $dependencies, TRUE));
$this->assertFalse(in_array('help', $dependencies, TRUE));
// Run updates.
$this->runUpdates();
$this->assertFalse(\Drupal::moduleHandler()->moduleExists('help_topics'));
$this->assertTrue(\Drupal::database()->schema()
->tableExists('help_search_items'));
$dependencies = $this->config('search.page.help_search')
->get('dependencies.module');
$this->assertFalse(in_array('help_topics', $dependencies, TRUE));
$this->assertTrue(in_array('help', $dependencies, TRUE));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.