Skip to content

Commit

Permalink
Skip tests for lower dbal versions
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielBadura committed Mar 28, 2024
1 parent 03beffc commit 300b010
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Unit/Store/DoctrineDbalStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileEmailChanged;
use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId;
use PDO;
use PHPUnit\Framework\Attributes\RequiresMethod;
use PHPUnit\Framework\Attributes\RequiresPhp;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;

use function iterator_to_array;
use function method_exists;

/** @covers \Patchlevel\EventSourcing\Store\DoctrineDbalStore */
final class DoctrineDbalStoreTest extends TestCase
Expand Down Expand Up @@ -144,9 +144,12 @@ public function testLoadWithLimit(): void
self::assertSame(null, $stream->position());
}

#[RequiresMethod(AbstractPlatform::class, 'supportsLimitOffset')]
public function testLoadWithOffset(): void
{
if (method_exists(AbstractPlatform::class, 'supportsLimitOffset')) {
$this->markTestSkipped('In older DBAL versions platforms did not need to support this');
}

$connection = $this->prophesize(Connection::class);
$result = $this->prophesize(Result::class);
$result->iterateAssociative()->willReturn(new EmptyIterator());
Expand Down

0 comments on commit 300b010

Please sign in to comment.