Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
  • Loading branch information
hgraca committed Sep 28, 2023
1 parent e77576f commit d278c6b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/Functional/Query/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,29 @@

namespace Doctrine\DBAL\Tests\Functional\Query;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\DB2Platform;
use Doctrine\DBAL\Platforms\MariaDb1027Platform;
use Doctrine\DBAL\Platforms\MySQL57Platform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Tests\FunctionalTestCase;
use Doctrine\DBAL\Tests\TestUtil;
use Doctrine\DBAL\Types\Types;

use function get_class;
use function sprintf;

final class QueryBuilderTest extends FunctionalTestCase
{
protected function setUp(): void
{
$platform = $this->connection->getDatabasePlatform();
if (! $this->supportsPlatform($platform)) {
self::markTestSkipped(sprintf('Skipping since connected to %s', get_class($platform)));
}

$tableName = 'users';
$table = new Table($tableName);
$table->addColumn('id', Types::INTEGER, ['autoincrement' => true]);
Expand All @@ -26,6 +39,14 @@ protected function setUp(): void
$this->connection->insert($tableName, ['nickname' => 'bbb']);
}

private function supportsPlatform(AbstractPlatform $platform): bool
{
return ! $platform instanceof DB2Platform
&& ! $platform instanceof MariaDb1027Platform
&& ! $platform instanceof MySQL57Platform
&& ! $platform instanceof SqlitePlatform;
}

public function testConcurrentConnectionSkipsLockedRows(): void
{
$connection1 = $this->connection;
Expand Down

0 comments on commit d278c6b

Please sign in to comment.