function Mysql8RequirePrimaryKeyUpdateTest::runDbTasks
Same name in other branches
- 10 core/modules/mysql/tests/src/Functional/Mysql8RequirePrimaryKeyUpdateTest.php \Drupal\Tests\mysql\Functional\Mysql8RequirePrimaryKeyUpdateTest::runDbTasks()
- 11.x core/modules/mysql/tests/src/Functional/Mysql8RequirePrimaryKeyUpdateTest.php \Drupal\Tests\mysql\Functional\Mysql8RequirePrimaryKeyUpdateTest::runDbTasks()
Overrides UpdatePathTestBase::runDbTasks
File
-
core/
modules/ user/ tests/ src/ Functional/ Mysql8RequirePrimaryKeyUpdateTest.php, line 18
Class
- Mysql8RequirePrimaryKeyUpdateTest
- Tests user_update_9301() on MySQL 8 when sql_require_primary_key is on.
Namespace
Drupal\Tests\user\FunctionalCode
protected function runDbTasks() {
parent::runDbTasks();
$database = Database::getConnection();
$is_maria = method_exists($database, 'isMariaDb') && $database->isMariaDb();
if ($database->databaseType() !== 'mysql' || $is_maria || version_compare($database->version(), '8.0.13', '<')) {
$this->markTestSkipped('This test only runs on MySQL 8.0.13 and above');
}
$database->query("SET sql_require_primary_key = 1;")
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.