/**
* Tests that updates fail if the database does not meet the minimum version.
*/
public function testUpdate() { if (Database::
getConnection()->
driver() !== 'mysql'
) { $this->
markTestSkipped('This test only works with the mysql driver'
);
} // Use a database driver that reports a fake database version that does
// not meet requirements. Only change the necessary settings in the database
// settings array so that run-tests.sh continues to work.
$autoload = Database::
findDriverAutoloadDirectory('Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion', \Drupal::
root());
$settings['databases'
]['default'
]['default'
]['driver'
] =
(object) [ 'value' => 'DrivertestMysqlDeprecatedVersion',
'required' => TRUE,
];
$settings['databases'
]['default'
]['default'
]['namespace'
] =
(object) [ 'value' => 'Drupal\\driver_test\\Driver\\Database\\DrivertestMysqlDeprecatedVersion',
'required' => TRUE,
];
$settings['databases'
]['default'
]['default'
]['autoload'
] =
(object) [ 'value' =>
$autoload,
'required' => TRUE,
];