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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<?php
namespace Doctrine\DBAL\Tests\Driver;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver;
use Doctrine\DBAL\Driver\API\ExceptionConverter;
use Doctrine\DBAL\Driver\API\PostgreSQL;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\PostgreSQL100Platform;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\PostgreSQLSchemaManager;
/** @extends AbstractDriverTest<PostgreSQLPlatform> */
class AbstractPostgreSQLDriverTest extends AbstractDriverTest
{
protected function createDriver(): Driver
{
return $this->getMockForAbstractClass(AbstractPostgreSQLDriver::class);
}
protected function createPlatform(): AbstractPlatform
{
return new PostgreSQL94Platform();
}
protected function createSchemaManager(Connection $connection): AbstractSchemaManager
{
return new PostgreSQLSchemaManager(
$connection,
$this->createPlatform(),
);
}
protected function createExceptionConverter(): ExceptionConverter
{
return new PostgreSQL\ExceptionConverter();
}
/**
* {@inheritDoc}
*/
public function getDatabasePlatformsForVersions(): array
{
return [
['9.4', PostgreSQL94Platform::class],
['9.4.0', PostgreSQL94Platform::class],
['9.4.1', PostgreSQL94Platform::class],
['10', PostgreSQL100Platform::class],
];
}
}
|