destructr/tests/Drivers/MySQL/MySQLDriverSchemaChangeTest.php
Joby Elliott f9a95898d4
Test overhaul (#2)
* 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
2022-05-27 10:44:41 -06:00

39 lines
956 B
PHP

<?php
/* Destructr | https://github.com/jobyone/destructr | MIT License */
declare(strict_types=1);
namespace Destructr\Drivers\MySQL;
use Destructr\Drivers\AbstractSQLDriverSchemaChangeTest;
use Destructr\Drivers\MySQLDriver;
class MySQLDriverSchemaChangeTest extends AbstractSQLDriverSchemaChangeTest
{
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';
}
}