destructr/tests/Drivers/MySQL/MySQLDriverIntegrationTest.php

40 lines
953 B
PHP
Raw Normal View History

2018-09-14 18:17:54 +00:00
<?php
/* Destructr | https://github.com/jobyone/destructr | MIT License */
declare(strict_types=1);
2018-09-14 18:17:54 +00:00
namespace Destructr\Drivers\MySQL;
use Destructr\Drivers\AbstractSQLDriverIntegrationTest;
2018-09-14 18:17:54 +00:00
use Destructr\Drivers\MySQLDriver;
class MySQLDriverIntegrationTest extends AbstractSQLDriverIntegrationTest
2018-09-14 18:17:54 +00:00
{
const DRIVER_CLASS = MySQLDriver::class;
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-09-14 18:17:54 +00:00
}