Skip to content

Commit 523caca

Browse files
committed
Add missing connection test
1 parent 423ff37 commit 523caca

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/Unit/Store/StreamDoctrineDbalStoreTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use EmptyIterator;
2626
use Patchlevel\EventSourcing\Message\Message;
2727
use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer;
28+
use Patchlevel\EventSourcing\Metadata\Event\EventRegistry;
2829
use Patchlevel\EventSourcing\Serializer\EventSerializer;
2930
use Patchlevel\EventSourcing\Serializer\SerializedEvent;
3031
use Patchlevel\EventSourcing\Store\ArchivedHeader;
@@ -43,6 +44,7 @@
4344
use Patchlevel\EventSourcing\Store\LockingNotImplemented;
4445
use Patchlevel\EventSourcing\Store\MissingDataForStorage;
4546
use Patchlevel\EventSourcing\Store\StreamDoctrineDbalStore;
47+
use Patchlevel\EventSourcing\Store\TaggableDoctrineDbalStore;
4648
use Patchlevel\EventSourcing\Store\UniqueConstraintViolation;
4749
use Patchlevel\EventSourcing\Store\UnsupportedCriterion;
4850
use Patchlevel\EventSourcing\Store\WrongQueryResult;
@@ -3005,4 +3007,19 @@ public function testWaitNotPostgres(): void
30053007
);
30063008
$doctrineDbalStore->wait(100);
30073009
}
3010+
3011+
public function testConnection(): void
3012+
{
3013+
$connection = $this->createMock(Connection::class);
3014+
$eventSerializer = $this->createMock(EventSerializer::class);
3015+
$headersSerializer = $this->createMock(HeadersSerializer::class);
3016+
3017+
$doctrineDbalStore = new StreamDoctrineDbalStore(
3018+
$connection,
3019+
$eventSerializer,
3020+
$headersSerializer,
3021+
);
3022+
3023+
self::assertSame($connection, $doctrineDbalStore->connection());
3024+
}
30083025
}

0 commit comments

Comments
 (0)