2018-08-17 17:32:10 +00:00
|
|
|
<?php
|
2020-08-26 15:52:25 +00:00
|
|
|
/* Destructr | https://github.com/jobyone/destructr | MIT License */
|
2022-05-27 16:44:41 +00:00
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2018-09-14 18:17:54 +00:00
|
|
|
namespace Destructr\Drivers\MySQL;
|
2018-08-17 17:32:10 +00:00
|
|
|
|
2020-08-29 21:28:45 +00:00
|
|
|
use Destructr\Drivers\AbstractSQLDriverTest;
|
2018-09-14 18:17:54 +00:00
|
|
|
use Destructr\Drivers\MySQLDriver;
|
2018-08-17 17:32:10 +00:00
|
|
|
|
2020-08-29 21:28:45 +00:00
|
|
|
class MySQLDriverTest extends AbstractSQLDriverTest
|
2018-08-17 17:32:10 +00:00
|
|
|
{
|
|
|
|
const DRIVER_CLASS = MySQLDriver::class;
|
2022-05-27 16:44:41 +00:00
|
|
|
|
|
|
|
protected static function DRIVER_DSN()
|
|
|
|
{
|
|
|
|
return sprintf(
|
|
|
|
'mysql:host=%s:%s;dbname=%s',
|
|
|
|
$_ENV['TEST_MYSQL_SERVER'],
|
|
|
|
$_ENV['TEST_MYSQL_PORT'],
|
|
|
|
static::DRIVER_DBNAME()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected static function DRIVER_DBNAME()
|
|
|
|
{
|
|
|
|
return @$_ENV['TEST_MYSQL_DBNAME'] ?? 'destructr_test';
|
|
|
|
}
|
|
|
|
|
|
|
|
protected static function DRIVER_USERNAME()
|
|
|
|
{
|
|
|
|
return @$_ENV['TEST_MYSQL_USER'] ?? 'root';
|
|
|
|
}
|
|
|
|
|
|
|
|
protected static function DRIVER_PASSWORD()
|
|
|
|
{
|
|
|
|
return @$_ENV['TEST_MYSQL_PASSWORD'] ?? 'root';
|
|
|
|
}
|
2018-08-17 17:32:10 +00:00
|
|
|
}
|