f9a95898d4
* first attempt at PHPUnit tests in github actions * composer ignore platform deps * another try * plumbing * pdo auth * more plumbing * doing env variables right * will this work? * calling phpunit directly * don't specify test * export * bug fix * trying something * trying another thing * trying again * trying it right * might work this time * testing can't work on 7.0
39 lines
934 B
PHP
39 lines
934 B
PHP
<?php
|
|
/* Destructr | https://github.com/jobyone/destructr | MIT License */
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Destructr\Drivers\MariaDB;
|
|
|
|
use Destructr\Drivers\AbstractSQLDriverTest;
|
|
use Destructr\Drivers\MariaDBDriver;
|
|
|
|
class MariaDBDriverTest extends AbstractSQLDriverTest
|
|
{
|
|
const DRIVER_CLASS = MariaDBDriver::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_MARIADB_DBNAME'] ?? 'destructr_test';
|
|
}
|
|
|
|
protected static function DRIVER_USERNAME()
|
|
{
|
|
return @$_ENV['TEST_MARIADB_USER'] ?? 'root';
|
|
}
|
|
|
|
protected static function DRIVER_PASSWORD()
|
|
{
|
|
return @$_ENV['TEST_MARIADB_PASSWORD'] ?? 'root';
|
|
}
|
|
}
|