Commit ade49d44 authored by catch's avatar catch

Issue #3065101 by alexpott: Remove MySqlDriverTestBase

parent fc0331b5
<?php
namespace Drupal\KernelTests\Core\Database\Driver\mysql;
use Drupal\KernelTests\Core\Database\DatabaseTestBase;
/**
* Base class for MySql driver-specific database tests.
*/
class MySqlDriverTestBase extends DatabaseTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
// Only run this test for the 'mysql' driver.
$driver = $this->connection->driver();
if ($driver !== 'mysql') {
$this->markTestSkipped("MySql tests can not run for driver '$driver'.");
}
}
}
<?php
namespace Drupal\KernelTests\Core\Database\Driver\mysql;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Component\Utility\Environment;
use Drupal\Core\Database\Database;
......@@ -11,12 +11,17 @@
*
* @group Database
*/
class LargeQueryTest extends MySqlDriverTestBase {
class LargeQueryTest extends DatabaseTestBase {
/**
* Tests truncation of messages when max_allowed_packet exception occurs.
*/
public function testMaxAllowedPacketQueryTruncating() {
// Only run this test for the 'mysql' driver.
$driver = $this->connection->driver();
if ($driver !== 'mysql') {
$this->markTestSkipped("MySql tests can not run for driver '$driver'.");
}
// The max_allowed_packet value is configured per database instance.
// Retrieve the max_allowed_packet value from the current instance and
// check if PHP is configured with sufficient allowed memory to be able
......
<?php
namespace Drupal\KernelTests\Core\Database\Driver\mysql;
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
......@@ -9,7 +9,7 @@
*
* @group Database
*/
class PrefixInfoTest extends MySqlDriverTestBase {
class PrefixInfoTest extends DatabaseTestBase {
/**
* Tests that DatabaseSchema::getPrefixInfo() returns the right database.
......@@ -21,6 +21,11 @@ class PrefixInfoTest extends MySqlDriverTestBase {
* set in the return array.
*/
public function testGetPrefixInfo() {
// Only run this test for the 'mysql' driver.
$driver = $this->connection->driver();
if ($driver !== 'mysql') {
$this->markTestSkipped("MySql tests can not run for driver '$driver'.");
}
$connection_info = Database::getConnectionInfo('default');
// Copy the default connection info to the 'extra' key.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment