class InstallerWithTablePrefixArrayTest
Tests the interactive installer with deprecated table prefix array.
@group Installer
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait extends \Drupal\Tests\BrowserTestBase
- class \Drupal\FunctionalTests\Installer\InstallerWithTablePrefixArrayTest extends \Drupal\FunctionalTests\Installer\InstallerTestBase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of InstallerWithTablePrefixArrayTest
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerWithTablePrefixArrayTest.php, line 10
Namespace
Drupal\FunctionalTests\InstallerView source
class InstallerWithTablePrefixArrayTest extends InstallerTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Ensures that the status report raises the warning after installation.
*/
public function testInstall() : void {
$this->drupalGet('admin/reports/status');
$this->assertSession()
->pageTextNotContains("There is at least one database entry in the \$database array in settings.php that has a 'prefix' value in the format of an array. Per-table prefixes are no longer supported.");
// Add a database with a multi-entry 'prefix' array.
$settings['databases']['test_fu']['default'] = (object) [
'value' => [
'database' => 'drupal_db',
'prefix' => [
'default' => 'foo',
'other_table' => 'qux',
],
'host' => 'localhost',
'namespace' => 'Drupal\\Core\\Database\\Driver\\sqlite',
'driver' => 'sqlite',
],
'required' => TRUE,
];
$this->writeSettings($settings);
$this->drupalGet('admin/reports/status');
$this->assertSession()
->pageTextContains("There is at least one database entry in the \$database array in settings.php that has a 'prefix' value in the format of an array. Per-table prefixes are no longer supported.");
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.