function UpdateEnableProviderDatabaseDriverTest::testPostUpdateEnableProviderDatabaseDriverHook
Tests that post update hooks are properly run.
File
-
core/
modules/ system/ tests/ src/ Functional/ Update/ UpdateEnableProviderDatabaseDriverTest.php, line 32
Class
- UpdateEnableProviderDatabaseDriverTest
- Tests that update hooks are enabling the database driver providing module.
Namespace
Drupal\Tests\system\Functional\UpdateCode
public function testPostUpdateEnableProviderDatabaseDriverHook() {
$connection = Database::getConnection();
$provider = $connection->getProvider();
$this->assertFalse(\Drupal::moduleHandler()->moduleExists($provider));
// Running the updates enables the module that is providing the database
// driver.
$this->runUpdates();
$this->assertTrue(\Drupal::moduleHandler()->moduleExists($provider));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.