1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<?php
declare(strict_types=1);
namespace Doctrine\DBAL\Tests\Driver\PDO\MySQL;
use Doctrine\DBAL\Driver\PDO\Exception\InvalidConfiguration;
use Doctrine\DBAL\Driver\PDO\MySQL\Driver;
use Doctrine\DBAL\Tests\Driver\AbstractMySQLDriverTestCase;
class DriverTest extends AbstractMySQLDriverTestCase
{
public function testUserIsFalse(): void
{
$this->expectException(InvalidConfiguration::class);
$this->expectExceptionMessage(
'The user configuration parameter is expected to be either a string or null, got bool.',
);
$this->driver->connect(['user' => false]);
}
public function testPasswordIsFalse(): void
{
$this->expectException(InvalidConfiguration::class);
$this->expectExceptionMessage(
'The password configuration parameter is expected to be either a string or null, got bool.',
);
$this->driver->connect(['password' => false]);
}
protected function createDriver(): Driver
{
return new Driver();
}
}
|