From 1343af5f41d9c2ba09be1cffc2bd017496daaa78 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Thu, 3 Apr 2025 13:01:52 +0000 Subject: [PATCH 1/4] migrate from PHPUnit phpdoc tags to attributes (to allow PHPUnit12 usage) --- .../BankAccountSplitStream/IntegrationTest.php | 3 ++- .../BasicImplementation/BasicIntegrationTest.php | 3 ++- .../ChildAggregateIntegrationTest.php | 3 ++- .../MicroAggregateIntegrationTest.php | 3 ++- .../Integration/PersonalData/PersonalDataTest.php | 3 ++- tests/Integration/Store/DoctrineDbalStoreTest.php | 3 ++- .../Store/StreamDoctrineDbalStoreTest.php | 3 ++- .../Integration/Subscription/SubscriptionTest.php | 3 ++- tests/Unit/Aggregate/AggregateHeaderTest.php | 3 ++- .../Aggregate/AggregateRootIdNotSupportedTest.php | 3 ++- tests/Unit/Aggregate/AggregateRootTest.php | 14 ++++++++------ tests/Unit/Aggregate/ApplyMethodNotFoundTest.php | 3 ++- tests/Unit/Aggregate/CustomIdTest.php | 3 ++- tests/Unit/Aggregate/MetadataNotPossibleTest.php | 3 ++- tests/Unit/Aggregate/UuidTest.php | 3 ++- tests/Unit/Attribute/AggregateTest.php | 3 ++- tests/Unit/Attribute/ApplyTest.php | 3 ++- tests/Unit/Attribute/EventTest.php | 3 ++- tests/Unit/Attribute/HeaderTest.php | 3 ++- tests/Unit/Attribute/IdTest.php | 3 ++- tests/Unit/Attribute/SetupTest.php | 3 ++- tests/Unit/Attribute/SnapshotTest.php | 3 ++- tests/Unit/Attribute/SplitStreamTest.php | 3 ++- tests/Unit/Attribute/SubscribeTest.php | 3 ++- tests/Unit/Attribute/SubscriberTest.php | 3 ++- tests/Unit/Attribute/SuppressMissingApplyTest.php | 3 ++- tests/Unit/Attribute/TeardownTest.php | 3 ++- tests/Unit/Clock/FrozenClockTest.php | 3 ++- tests/Unit/Clock/SystemClockTest.php | 3 ++- .../CommandBus/AggregateHandlerProviderTest.php | 3 ++- tests/Unit/CommandBus/ChainHandlerProviderTest.php | 3 ++- .../Handler/CreateAggregateHandlerTest.php | 3 ++- .../Handler/DefaultParameterResolverTest.php | 3 ++- .../Handler/UpdateAggregateHandlerTest.php | 3 ++- tests/Unit/CommandBus/HandlerDescriptorTest.php | 3 ++- tests/Unit/CommandBus/HandlerFinderTest.php | 3 ++- .../Unit/CommandBus/ServiceHandlerProviderTest.php | 3 ++- tests/Unit/CommandBus/ServiceLocatorTest.php | 3 ++- tests/Unit/CommandBus/SyncCommandBusTest.php | 3 ++- .../Console/Command/DatabaseCreateCommandTest.php | 3 ++- .../Console/Command/DatabaseDropCommandTest.php | 3 ++- .../Console/Command/SchemaCreateCommandTest.php | 3 ++- .../Unit/Console/Command/SchemaDropCommandTest.php | 3 ++- .../Console/Command/SchemaUpdateCommandTest.php | 3 ++- .../Console/Command/ShowAggregateCommandTest.php | 3 ++- tests/Unit/Console/DoctrineHelperTest.php | 3 ++- tests/Unit/Console/InputHelperTest.php | 3 ++- tests/Unit/Console/InvalidArgumentGivenTest.php | 3 ++- tests/Unit/Console/OutputStyleTest.php | 3 ++- .../EventBus/AttributeListenerProviderTest.php | 3 ++- tests/Unit/EventBus/DefaultConsumerTest.php | 3 ++- tests/Unit/EventBus/DefaultEventBusTest.php | 3 ++- tests/Unit/EventBus/ListenerDescriptorTest.php | 3 ++- tests/Unit/EventBus/Psr14EventBusTest.php | 3 ++- tests/Unit/Message/HeaderNotFoundTest.php | 3 ++- tests/Unit/Message/MessageTest.php | 3 ++- tests/Unit/Message/PipeTest.php | 3 ++- tests/Unit/Message/ReducerTest.php | 3 ++- .../Serializer/DefaultHeadersSerializerTest.php | 3 ++- .../AggregateToStreamHeaderTranslatorTest.php | 3 ++- .../Message/Translator/ChainTranslatorTest.php | 3 ++- .../Message/Translator/ClosureTranslatorTest.php | 3 ++- .../Translator/ExcludeEventTranslatorTest.php | 3 ++- .../ExcludeEventWithHeaderTranslatorTest.php | 3 ++- .../Translator/FilterEventTranslatorTest.php | 3 ++- .../Translator/IncludeEventTranslatorTest.php | 3 ++- .../IncludeEventWithHeaderTranslatorTest.php | 3 ++- .../RecalculatePlayheadTranslatorTest.php | 3 ++- .../Translator/ReplaceEventTranslatorTest.php | 3 ++- .../Translator/UntilEventTranslatorTest.php | 3 ++- .../Aggregate/AggregateRootRegistryTest.php | 3 ++- .../AttributeAggregateMetadataFactoryTest.php | 3 ++- .../AttributeAggregateRootRegistryFactoryTest.php | 3 ++- tests/Unit/Metadata/ClassFinderTest.php | 3 ++- .../Event/AttributeEventMetadataFactoryTest.php | 3 ++- .../Event/AttributeEventRegistryFactoryTest.php | 3 ++- tests/Unit/Metadata/Event/EventRegistryTest.php | 3 ++- .../AttributeSubscriberMetadataFactoryTest.php | 3 ++- .../Repository/DefaultRepositoryManagerTest.php | 3 ++- tests/Unit/Repository/DefaultRepositoryTest.php | 3 ++- .../MessageDecorator/ChainMessageDecoratorTest.php | 3 ++- .../MessageDecorator/SplitStreamDecoratorTest.php | 3 ++- .../Schema/ChainDoctrineSchemaConfiguratorTest.php | 3 ++- .../Schema/DoctrineMigrationSchemaProviderTest.php | 3 ++- tests/Unit/Schema/DoctrineSchemaDirectorTest.php | 3 ++- tests/Unit/Schema/DoctrineSchemaListenerTest.php | 3 ++- tests/Unit/Schema/DoctrineSchemaSubscriberTest.php | 3 ++- .../Unit/Serializer/DefaultEventSerializerTest.php | 3 ++- .../Serializer/Encoder/DecodeNotPossibleTest.php | 3 ++- .../Serializer/Encoder/EncodeNotPossibleTest.php | 3 ++- tests/Unit/Serializer/Encoder/JsonEncoderTest.php | 3 ++- tests/Unit/Serializer/SerializedEventTest.php | 3 ++- tests/Unit/Serializer/Upcast/UpcastTest.php | 3 ++- tests/Unit/Serializer/Upcast/UpcasterChainTest.php | 3 ++- .../Adapter/InMemorySnapshotAdapterTest.php | 3 ++- .../Snapshot/Adapter/Psr16SnapshotAdapterTest.php | 3 ++- .../Snapshot/Adapter/Psr6SnapshotAdapterTest.php | 3 ++- .../Unit/Snapshot/Adapter/SnapshotNotFoundTest.php | 3 ++- tests/Unit/Snapshot/AdapterNotFoundTest.php | 3 ++- tests/Unit/Snapshot/ArrayAdapterRepositoryTest.php | 3 ++- tests/Unit/Snapshot/DefaultSnapshotStoreTest.php | 3 ++- tests/Unit/Snapshot/SnapshotNotConfiguredTest.php | 3 ++- tests/Unit/Snapshot/SnapshotNotFoundTest.php | 3 ++- tests/Unit/Snapshot/SnapshotTest.php | 3 ++- tests/Unit/Snapshot/SnapshotVersionInvalidTest.php | 3 ++- tests/Unit/Store/ArrayStreamTest.php | 3 ++- tests/Unit/Store/Crtieria/CriteriaBuilderTest.php | 3 ++- tests/Unit/Store/Crtieria/CriteriaTest.php | 3 ++- tests/Unit/Store/DoctrineDbalStoreTest.php | 3 ++- tests/Unit/Store/DoctrineDbalStreamTest.php | 3 ++- tests/Unit/Store/InMemoryStoreTest.php | 3 ++- tests/Unit/Store/ReadOnlyStoreTest.php | 3 ++- tests/Unit/Store/StreamDoctrineDbalStoreTest.php | 3 ++- tests/Unit/Store/StreamDoctrineDbalStreamTest.php | 3 ++- tests/Unit/Store/StreamReadOnlyStoreTest.php | 4 +++- .../Engine/CatchUpSubscriptionEngineTest.php | 3 ++- .../Engine/DefaultSubscriptionEngineTest.php | 3 ++- .../Unit/Subscription/Engine/ErrorDetectedTest.php | 3 ++- .../Engine/SubscriptionManagerTest.php | 3 ++- .../Engine/ThrowOnErrorSubscriptionEngineTest.php | 3 ++- tests/Unit/Subscription/Lookup/LookupTest.php | 3 ++- .../RunSubscriptionEngineRepositoryManagerTest.php | 3 ++- .../RunSubscriptionEngineRepositoryTest.php | 3 ++- .../RetryStrategy/ClockBasedRetryStrategyTest.php | 3 ++- .../RetryStrategy/NoRetryStrategyTest.php | 3 ++- tests/Unit/Subscription/Store/ErrorContextTest.php | 3 ++- .../Store/InMemorySubscriptionStoreTest.php | 3 ++- .../Store/SubscriptionAlreadyExistsTest.php | 3 ++- .../Store/SubscriptionCriteriaTest.php | 3 ++- .../Store/SubscriptionNotFoundTest.php | 3 ++- .../AggregateIdArgumentResolverTest.php | 3 ++- .../ArgumentResolver/EventArgumentResolverTest.php | 3 ++- .../ArgumentResolver/LookupResolverTest.php | 4 +++- .../MessageArgumentResolverTest.php | 3 ++- .../RecordedOnArgumentResolverTest.php | 3 ++- .../MetadataSubscriberAccessorRepositoryTest.php | 3 ++- .../Subscriber/MetadataSubscriberAccessorTest.php | 3 ++- .../Subscriber/SubscriberHelperTest.php | 3 ++- tests/Unit/Subscription/SubscriptionErrorTest.php | 3 ++- tests/Unit/Subscription/SubscriptionTest.php | 3 ++- .../Unit/Test/IncrementalRamseyUuidFactoryTest.php | 3 ++- 141 files changed, 290 insertions(+), 146 deletions(-) diff --git a/tests/Integration/BankAccountSplitStream/IntegrationTest.php b/tests/Integration/BankAccountSplitStream/IntegrationTest.php index f571883d4..908ace650 100644 --- a/tests/Integration/BankAccountSplitStream/IntegrationTest.php +++ b/tests/Integration/BankAccountSplitStream/IntegrationTest.php @@ -25,12 +25,13 @@ use Patchlevel\EventSourcing\Tests\Integration\BankAccountSplitStream\Events\BankAccountCreated; use Patchlevel\EventSourcing\Tests\Integration\BankAccountSplitStream\Events\MonthPassed; use Patchlevel\EventSourcing\Tests\Integration\BankAccountSplitStream\Projection\BankAccountProjector; +use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\TestCase; use function count; use function iterator_to_array; -/** @coversNothing */ +#[CoversNothing] final class IntegrationTest extends TestCase { private Connection $connection; diff --git a/tests/Integration/BasicImplementation/BasicIntegrationTest.php b/tests/Integration/BasicImplementation/BasicIntegrationTest.php index 374ce601a..6b0a05add 100644 --- a/tests/Integration/BasicImplementation/BasicIntegrationTest.php +++ b/tests/Integration/BasicImplementation/BasicIntegrationTest.php @@ -36,10 +36,11 @@ use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\MessageDecorator\FooMessageDecorator; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Processor\SendEmailProcessor; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Projection\ProfileProjector; +use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; -/** @coversNothing */ +#[CoversNothing] final class BasicIntegrationTest extends TestCase { private Connection $connection; diff --git a/tests/Integration/ChildAggregate/ChildAggregateIntegrationTest.php b/tests/Integration/ChildAggregate/ChildAggregateIntegrationTest.php index ea036a87e..49133366b 100644 --- a/tests/Integration/ChildAggregate/ChildAggregateIntegrationTest.php +++ b/tests/Integration/ChildAggregate/ChildAggregateIntegrationTest.php @@ -19,9 +19,10 @@ use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessorRepository; use Patchlevel\EventSourcing\Tests\DbalManager; use Patchlevel\EventSourcing\Tests\Integration\ChildAggregate\Projection\ProfileProjector; +use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\TestCase; -/** @coversNothing */ +#[CoversNothing] final class ChildAggregateIntegrationTest extends TestCase { private Connection $connection; diff --git a/tests/Integration/MicroAggregate/MicroAggregateIntegrationTest.php b/tests/Integration/MicroAggregate/MicroAggregateIntegrationTest.php index 16a57b31c..e85c001b3 100644 --- a/tests/Integration/MicroAggregate/MicroAggregateIntegrationTest.php +++ b/tests/Integration/MicroAggregate/MicroAggregateIntegrationTest.php @@ -19,9 +19,10 @@ use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessorRepository; use Patchlevel\EventSourcing\Tests\DbalManager; use Patchlevel\EventSourcing\Tests\Integration\MicroAggregate\Projection\ProfileProjector; +use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\TestCase; -/** @coversNothing */ +#[CoversNothing] final class MicroAggregateIntegrationTest extends TestCase { private Connection $connection; diff --git a/tests/Integration/PersonalData/PersonalDataTest.php b/tests/Integration/PersonalData/PersonalDataTest.php index 07be5dc46..eb2b4a7fb 100644 --- a/tests/Integration/PersonalData/PersonalDataTest.php +++ b/tests/Integration/PersonalData/PersonalDataTest.php @@ -20,9 +20,10 @@ use Patchlevel\EventSourcing\Tests\DbalManager; use Patchlevel\EventSourcing\Tests\Integration\PersonalData\Processor\DeletePersonalDataProcessor; use Patchlevel\Hydrator\Cryptography\PersonalDataPayloadCryptographer; +use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\TestCase; -/** @coversNothing */ +#[CoversNothing] final class PersonalDataTest extends TestCase { private Connection $connection; diff --git a/tests/Integration/Store/DoctrineDbalStoreTest.php b/tests/Integration/Store/DoctrineDbalStoreTest.php index 9256cc335..3eee96ad9 100644 --- a/tests/Integration/Store/DoctrineDbalStoreTest.php +++ b/tests/Integration/Store/DoctrineDbalStoreTest.php @@ -15,11 +15,12 @@ use Patchlevel\EventSourcing\Store\UniqueConstraintViolation; use Patchlevel\EventSourcing\Tests\DbalManager; use Patchlevel\EventSourcing\Tests\Integration\Store\Events\ProfileCreated; +use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\TestCase; use function json_decode; -/** @coversNothing */ +#[CoversNothing] final class DoctrineDbalStoreTest extends TestCase { private Connection $connection; diff --git a/tests/Integration/Store/StreamDoctrineDbalStoreTest.php b/tests/Integration/Store/StreamDoctrineDbalStoreTest.php index 8fbe53d7d..9d22d7b5f 100644 --- a/tests/Integration/Store/StreamDoctrineDbalStoreTest.php +++ b/tests/Integration/Store/StreamDoctrineDbalStoreTest.php @@ -24,6 +24,7 @@ use Patchlevel\EventSourcing\Tests\DbalManager; use Patchlevel\EventSourcing\Tests\Integration\Store\Events\ExternEvent; use Patchlevel\EventSourcing\Tests\Integration\Store\Events\ProfileCreated; +use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; @@ -31,7 +32,7 @@ use function json_decode; use function sprintf; -/** @coversNothing */ +#[CoversNothing] final class StreamDoctrineDbalStoreTest extends TestCase { private Connection $connection; diff --git a/tests/Integration/Subscription/SubscriptionTest.php b/tests/Integration/Subscription/SubscriptionTest.php index cb6d91fc1..9da41172f 100644 --- a/tests/Integration/Subscription/SubscriptionTest.php +++ b/tests/Integration/Subscription/SubscriptionTest.php @@ -42,6 +42,7 @@ use Patchlevel\EventSourcing\Tests\Integration\Subscription\Subscriber\ProfileNewProjection; use Patchlevel\EventSourcing\Tests\Integration\Subscription\Subscriber\ProfileProcessor; use Patchlevel\EventSourcing\Tests\Integration\Subscription\Subscriber\ProfileProjection; +use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\TestCase; use RuntimeException; @@ -49,7 +50,7 @@ use function iterator_to_array; use function sprintf; -/** @coversNothing */ +#[CoversNothing] final class SubscriptionTest extends TestCase { private Connection $connection; diff --git a/tests/Unit/Aggregate/AggregateHeaderTest.php b/tests/Unit/Aggregate/AggregateHeaderTest.php index 492877a91..4e606cf9a 100644 --- a/tests/Unit/Aggregate/AggregateHeaderTest.php +++ b/tests/Unit/Aggregate/AggregateHeaderTest.php @@ -6,9 +6,10 @@ use DateTimeImmutable; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Aggregate\AggregateHeader */ +#[CoversClass(AggregateHeader::class)] final class AggregateHeaderTest extends TestCase { public function testInstantiate(): void diff --git a/tests/Unit/Aggregate/AggregateRootIdNotSupportedTest.php b/tests/Unit/Aggregate/AggregateRootIdNotSupportedTest.php index 8b0246782..0b82e20eb 100644 --- a/tests/Unit/Aggregate/AggregateRootIdNotSupportedTest.php +++ b/tests/Unit/Aggregate/AggregateRootIdNotSupportedTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Aggregate\AggregateRootIdNotSupported; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Aggregate\AggregateRootIdNotSupported */ +#[CoversClass(AggregateRootIdNotSupported::class)] final class AggregateRootIdNotSupportedTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Aggregate/AggregateRootTest.php b/tests/Unit/Aggregate/AggregateRootTest.php index b378a4df1..e6e414b56 100644 --- a/tests/Unit/Aggregate/AggregateRootTest.php +++ b/tests/Unit/Aggregate/AggregateRootTest.php @@ -4,7 +4,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Aggregate; +use Patchlevel\EventSourcing\Aggregate\AggregateRootAttributeBehaviour; +use Patchlevel\EventSourcing\Aggregate\AggregateRootBehaviour; use Patchlevel\EventSourcing\Aggregate\AggregateRootIdNotSupported; +use Patchlevel\EventSourcing\Aggregate\AggregateRootMetadataAwareBehaviour; use Patchlevel\EventSourcing\Aggregate\ApplyMethodNotFound; use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot; use Patchlevel\EventSourcing\Aggregate\MetadataNotPossible; @@ -25,15 +28,14 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileInvalid; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithBrokenId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithSuppressAll; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RunInSeparateProcess; use PHPUnit\Framework\TestCase; -/** - * @covers \Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot - * @covers \Patchlevel\EventSourcing\Aggregate\AggregateRootBehaviour - * @covers \Patchlevel\EventSourcing\Aggregate\AggregateRootAttributeBehaviour - * @covers \Patchlevel\EventSourcing\Aggregate\AggregateRootMetadataAwareBehaviour - */ +#[CoversClass(BasicAggregateRoot::class)] +#[CoversClass(AggregateRootBehaviour::class)] +#[CoversClass(AggregateRootAttributeBehaviour::class)] +#[CoversClass(AggregateRootMetadataAwareBehaviour::class)] final class AggregateRootTest extends TestCase { public function testApplyMethod(): void diff --git a/tests/Unit/Aggregate/ApplyMethodNotFoundTest.php b/tests/Unit/Aggregate/ApplyMethodNotFoundTest.php index e3e4635c4..cc6069738 100644 --- a/tests/Unit/Aggregate/ApplyMethodNotFoundTest.php +++ b/tests/Unit/Aggregate/ApplyMethodNotFoundTest.php @@ -7,9 +7,10 @@ use Patchlevel\EventSourcing\Aggregate\ApplyMethodNotFound; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Aggregate\ApplyMethodNotFound */ +#[CoversClass(ApplyMethodNotFound::class)] final class ApplyMethodNotFoundTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Aggregate/CustomIdTest.php b/tests/Unit/Aggregate/CustomIdTest.php index 4367161bc..8c0a1551d 100644 --- a/tests/Unit/Aggregate/CustomIdTest.php +++ b/tests/Unit/Aggregate/CustomIdTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Aggregate; use Patchlevel\EventSourcing\Aggregate\CustomId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Aggregate\CustomId */ +#[CoversClass(CustomId::class)] final class CustomIdTest extends TestCase { public function testFromString(): void diff --git a/tests/Unit/Aggregate/MetadataNotPossibleTest.php b/tests/Unit/Aggregate/MetadataNotPossibleTest.php index 70ff23251..2221d918f 100644 --- a/tests/Unit/Aggregate/MetadataNotPossibleTest.php +++ b/tests/Unit/Aggregate/MetadataNotPossibleTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Aggregate; use Patchlevel\EventSourcing\Aggregate\MetadataNotPossible; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Aggregate\MetadataNotPossible */ +#[CoversClass(MetadataNotPossible::class)] final class MetadataNotPossibleTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Aggregate/UuidTest.php b/tests/Unit/Aggregate/UuidTest.php index f7c0cd962..9d039f36b 100644 --- a/tests/Unit/Aggregate/UuidTest.php +++ b/tests/Unit/Aggregate/UuidTest.php @@ -6,12 +6,13 @@ use DateTimeInterface; use Patchlevel\EventSourcing\Aggregate\Uuid; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Ramsey\Uuid\Uuid as RamseyUuid; use Ramsey\Uuid\UuidFactory; use Ramsey\Uuid\UuidInterface; -/** @covers \Patchlevel\EventSourcing\Aggregate\Uuid */ +#[CoversClass(Uuid::class)] final class UuidTest extends TestCase { public function testFromString(): void diff --git a/tests/Unit/Attribute/AggregateTest.php b/tests/Unit/Attribute/AggregateTest.php index fae7e918c..176650f7f 100644 --- a/tests/Unit/Attribute/AggregateTest.php +++ b/tests/Unit/Attribute/AggregateTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Attribute; use Patchlevel\EventSourcing\Attribute\Aggregate; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Aggregate */ +#[CoversClass(Aggregate::class)] final class AggregateTest extends TestCase { public function testInstantiate(): void diff --git a/tests/Unit/Attribute/ApplyTest.php b/tests/Unit/Attribute/ApplyTest.php index e5b638c68..3a65c6a99 100644 --- a/tests/Unit/Attribute/ApplyTest.php +++ b/tests/Unit/Attribute/ApplyTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Attribute\Apply; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Apply */ +#[CoversClass(Apply::class)] final class ApplyTest extends TestCase { public function testInstantiate(): void diff --git a/tests/Unit/Attribute/EventTest.php b/tests/Unit/Attribute/EventTest.php index ae61deb68..f8c65756e 100644 --- a/tests/Unit/Attribute/EventTest.php +++ b/tests/Unit/Attribute/EventTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Attribute; use Patchlevel\EventSourcing\Attribute\Event; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Event */ +#[CoversClass(Event::class)] final class EventTest extends TestCase { public function testInstantiate(): void diff --git a/tests/Unit/Attribute/HeaderTest.php b/tests/Unit/Attribute/HeaderTest.php index a4161db28..f326390c3 100644 --- a/tests/Unit/Attribute/HeaderTest.php +++ b/tests/Unit/Attribute/HeaderTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Attribute; use Patchlevel\EventSourcing\Attribute\Header; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Header */ +#[CoversClass(Header::class)] final class HeaderTest extends TestCase { public function testInstantiate(): void diff --git a/tests/Unit/Attribute/IdTest.php b/tests/Unit/Attribute/IdTest.php index c638e6b31..496b4528c 100644 --- a/tests/Unit/Attribute/IdTest.php +++ b/tests/Unit/Attribute/IdTest.php @@ -5,10 +5,11 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Attribute; use Patchlevel\EventSourcing\Attribute\Id; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Id */ +#[CoversClass(Id::class)] final class IdTest extends TestCase { #[DoesNotPerformAssertions] diff --git a/tests/Unit/Attribute/SetupTest.php b/tests/Unit/Attribute/SetupTest.php index 33919033f..3d62a7cbe 100644 --- a/tests/Unit/Attribute/SetupTest.php +++ b/tests/Unit/Attribute/SetupTest.php @@ -5,10 +5,11 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Attribute; use Patchlevel\EventSourcing\Attribute\Setup; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Setup */ +#[CoversClass(Setup::class)] final class SetupTest extends TestCase { #[DoesNotPerformAssertions] diff --git a/tests/Unit/Attribute/SnapshotTest.php b/tests/Unit/Attribute/SnapshotTest.php index b0e45dedc..5bee905a1 100644 --- a/tests/Unit/Attribute/SnapshotTest.php +++ b/tests/Unit/Attribute/SnapshotTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Attribute; use Patchlevel\EventSourcing\Attribute\Snapshot; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Snapshot */ +#[CoversClass(Snapshot::class)] final class SnapshotTest extends TestCase { public function testInstantiate(): void diff --git a/tests/Unit/Attribute/SplitStreamTest.php b/tests/Unit/Attribute/SplitStreamTest.php index 2ab30a792..441d7ad5b 100644 --- a/tests/Unit/Attribute/SplitStreamTest.php +++ b/tests/Unit/Attribute/SplitStreamTest.php @@ -5,10 +5,11 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Attribute; use Patchlevel\EventSourcing\Attribute\SplitStream; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\SplitStream */ +#[CoversClass(SplitStream::class)] final class SplitStreamTest extends TestCase { #[DoesNotPerformAssertions] diff --git a/tests/Unit/Attribute/SubscribeTest.php b/tests/Unit/Attribute/SubscribeTest.php index 877212dad..6f7c0fd96 100644 --- a/tests/Unit/Attribute/SubscribeTest.php +++ b/tests/Unit/Attribute/SubscribeTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Subscribe */ +#[CoversClass(Subscribe::class)] final class SubscribeTest extends TestCase { public function testInstantiate(): void diff --git a/tests/Unit/Attribute/SubscriberTest.php b/tests/Unit/Attribute/SubscriberTest.php index fcbf24b99..2ef4d0770 100644 --- a/tests/Unit/Attribute/SubscriberTest.php +++ b/tests/Unit/Attribute/SubscriberTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Attribute\Subscriber; use Patchlevel\EventSourcing\Subscription\RunMode; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Subscriber */ +#[CoversClass(Subscriber::class)] final class SubscriberTest extends TestCase { public function testInstantiate(): void diff --git a/tests/Unit/Attribute/SuppressMissingApplyTest.php b/tests/Unit/Attribute/SuppressMissingApplyTest.php index f7ea6f865..9199fe885 100644 --- a/tests/Unit/Attribute/SuppressMissingApplyTest.php +++ b/tests/Unit/Attribute/SuppressMissingApplyTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Attribute\SuppressMissingApply; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\SuppressMissingApply */ +#[CoversClass(SuppressMissingApply::class)] final class SuppressMissingApplyTest extends TestCase { public function testSuppressEvents(): void diff --git a/tests/Unit/Attribute/TeardownTest.php b/tests/Unit/Attribute/TeardownTest.php index 1b902f20f..5a784f2eb 100644 --- a/tests/Unit/Attribute/TeardownTest.php +++ b/tests/Unit/Attribute/TeardownTest.php @@ -5,10 +5,11 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Attribute; use Patchlevel\EventSourcing\Attribute\Teardown; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Attribute\Teardown */ +#[CoversClass(Teardown::class)] final class TeardownTest extends TestCase { #[DoesNotPerformAssertions] diff --git a/tests/Unit/Clock/FrozenClockTest.php b/tests/Unit/Clock/FrozenClockTest.php index 461da2b31..6a3166264 100644 --- a/tests/Unit/Clock/FrozenClockTest.php +++ b/tests/Unit/Clock/FrozenClockTest.php @@ -6,9 +6,10 @@ use DateTimeImmutable; use Patchlevel\EventSourcing\Clock\FrozenClock; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Clock\FrozenClock */ +#[CoversClass(FrozenClock::class)] final class FrozenClockTest extends TestCase { public function testCreateDateTimeImmutableWithFrozenClock(): void diff --git a/tests/Unit/Clock/SystemClockTest.php b/tests/Unit/Clock/SystemClockTest.php index d8799117f..297c63dc4 100644 --- a/tests/Unit/Clock/SystemClockTest.php +++ b/tests/Unit/Clock/SystemClockTest.php @@ -6,9 +6,10 @@ use DateTimeImmutable; use Patchlevel\EventSourcing\Clock\SystemClock; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Clock\SystemClock */ +#[CoversClass(SystemClock::class)] final class SystemClockTest extends TestCase { public function testCreateDateTimeImmutable(): void diff --git a/tests/Unit/CommandBus/AggregateHandlerProviderTest.php b/tests/Unit/CommandBus/AggregateHandlerProviderTest.php index 8be2db200..990f2b96a 100644 --- a/tests/Unit/CommandBus/AggregateHandlerProviderTest.php +++ b/tests/Unit/CommandBus/AggregateHandlerProviderTest.php @@ -13,10 +13,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ChangeProfileName; use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithHandler; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\CommandBus\AggregateHandlerProvider */ +#[CoversClass(AggregateHandlerProvider::class)] final class AggregateHandlerProviderTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/CommandBus/ChainHandlerProviderTest.php b/tests/Unit/CommandBus/ChainHandlerProviderTest.php index 9e4cbb4ac..b5d188943 100644 --- a/tests/Unit/CommandBus/ChainHandlerProviderTest.php +++ b/tests/Unit/CommandBus/ChainHandlerProviderTest.php @@ -8,10 +8,11 @@ use Patchlevel\EventSourcing\CommandBus\HandlerDescriptor; use Patchlevel\EventSourcing\CommandBus\HandlerProvider; use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\CommandBus\ChainHandlerProvider */ +#[CoversClass(ChainHandlerProvider::class)] final class ChainHandlerProviderTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/CommandBus/Handler/CreateAggregateHandlerTest.php b/tests/Unit/CommandBus/Handler/CreateAggregateHandlerTest.php index cc2ca379f..06b6c1f0d 100644 --- a/tests/Unit/CommandBus/Handler/CreateAggregateHandlerTest.php +++ b/tests/Unit/CommandBus/Handler/CreateAggregateHandlerTest.php @@ -12,11 +12,12 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithHandler; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\CommandBus\Handler\CreateAggregateHandler */ +#[CoversClass(CreateAggregateHandler::class)] final class CreateAggregateHandlerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/CommandBus/Handler/DefaultParameterResolverTest.php b/tests/Unit/CommandBus/Handler/DefaultParameterResolverTest.php index 46c66a168..623e3322f 100644 --- a/tests/Unit/CommandBus/Handler/DefaultParameterResolverTest.php +++ b/tests/Unit/CommandBus/Handler/DefaultParameterResolverTest.php @@ -8,13 +8,14 @@ use Patchlevel\EventSourcing\CommandBus\Handler\DefaultParameterResolver; use Patchlevel\EventSourcing\CommandBus\Handler\ServiceNotResolvable; use Patchlevel\EventSourcing\CommandBus\ServiceNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Psr\Container\ContainerInterface; use ReflectionMethod; use stdClass; -/** @covers \Patchlevel\EventSourcing\CommandBus\Handler\DefaultParameterResolver */ +#[CoversClass(DefaultParameterResolver::class)] final class DefaultParameterResolverTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/CommandBus/Handler/UpdateAggregateHandlerTest.php b/tests/Unit/CommandBus/Handler/UpdateAggregateHandlerTest.php index 990b90314..c6566f9d3 100644 --- a/tests/Unit/CommandBus/Handler/UpdateAggregateHandlerTest.php +++ b/tests/Unit/CommandBus/Handler/UpdateAggregateHandlerTest.php @@ -13,10 +13,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithHandler; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\CommandBus\Handler\UpdateAggregateHandler */ +#[CoversClass(UpdateAggregateHandler::class)] final class UpdateAggregateHandlerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/CommandBus/HandlerDescriptorTest.php b/tests/Unit/CommandBus/HandlerDescriptorTest.php index c7174126f..85ba3db27 100644 --- a/tests/Unit/CommandBus/HandlerDescriptorTest.php +++ b/tests/Unit/CommandBus/HandlerDescriptorTest.php @@ -6,10 +6,11 @@ use Patchlevel\EventSourcing\CommandBus\HandlerDescriptor; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithHandler; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\CommandBus\HandlerDescriptor */ +#[CoversClass(HandlerDescriptor::class)] final class HandlerDescriptorTest extends TestCase { public function testObjectMethod(): void diff --git a/tests/Unit/CommandBus/HandlerFinderTest.php b/tests/Unit/CommandBus/HandlerFinderTest.php index 09fecb3e1..671476b09 100644 --- a/tests/Unit/CommandBus/HandlerFinderTest.php +++ b/tests/Unit/CommandBus/HandlerFinderTest.php @@ -9,10 +9,11 @@ use Patchlevel\EventSourcing\CommandBus\HandlerReference; use Patchlevel\EventSourcing\CommandBus\InvalidHandleMethod; use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\CommandBus\HandlerFinder */ +#[CoversClass(HandlerFinder::class)] final class HandlerFinderTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/CommandBus/ServiceHandlerProviderTest.php b/tests/Unit/CommandBus/ServiceHandlerProviderTest.php index dd4c2e373..d7928476b 100644 --- a/tests/Unit/CommandBus/ServiceHandlerProviderTest.php +++ b/tests/Unit/CommandBus/ServiceHandlerProviderTest.php @@ -7,10 +7,11 @@ use Patchlevel\EventSourcing\Attribute\Handle; use Patchlevel\EventSourcing\CommandBus\ServiceHandlerProvider; use Patchlevel\EventSourcing\Tests\Unit\Fixture\CreateProfile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\CommandBus\ServiceHandlerProvider */ +#[CoversClass(ServiceHandlerProvider::class)] final class ServiceHandlerProviderTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/CommandBus/ServiceLocatorTest.php b/tests/Unit/CommandBus/ServiceLocatorTest.php index fc732e917..16280b50a 100644 --- a/tests/Unit/CommandBus/ServiceLocatorTest.php +++ b/tests/Unit/CommandBus/ServiceLocatorTest.php @@ -7,10 +7,11 @@ use Patchlevel\EventSourcing\Clock\SystemClock; use Patchlevel\EventSourcing\CommandBus\ServiceLocator; use Patchlevel\EventSourcing\CommandBus\ServiceNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; -/** @covers \Patchlevel\EventSourcing\CommandBus\ServiceLocator */ +#[CoversClass(ServiceLocator::class)] final class ServiceLocatorTest extends TestCase { public function testGetService(): void diff --git a/tests/Unit/CommandBus/SyncCommandBusTest.php b/tests/Unit/CommandBus/SyncCommandBusTest.php index c70ebeb30..f138abd0d 100644 --- a/tests/Unit/CommandBus/SyncCommandBusTest.php +++ b/tests/Unit/CommandBus/SyncCommandBusTest.php @@ -9,10 +9,11 @@ use Patchlevel\EventSourcing\CommandBus\HandlerProvider; use Patchlevel\EventSourcing\CommandBus\MultipleHandlersFound; use Patchlevel\EventSourcing\CommandBus\SyncCommandBus; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\CommandBus\SyncCommandBus */ +#[CoversClass(SyncCommandBus::class)] final class SyncCommandBusTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Console/Command/DatabaseCreateCommandTest.php b/tests/Unit/Console/Command/DatabaseCreateCommandTest.php index 48a5bc7b4..e26aecc73 100644 --- a/tests/Unit/Console/Command/DatabaseCreateCommandTest.php +++ b/tests/Unit/Console/Command/DatabaseCreateCommandTest.php @@ -7,13 +7,14 @@ use Doctrine\DBAL\Connection; use Patchlevel\EventSourcing\Console\Command\DatabaseCreateCommand; use Patchlevel\EventSourcing\Console\DoctrineHelper; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use RuntimeException; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; -/** @covers \Patchlevel\EventSourcing\Console\Command\DatabaseCreateCommand */ +#[CoversClass(DatabaseCreateCommand::class)] final class DatabaseCreateCommandTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Console/Command/DatabaseDropCommandTest.php b/tests/Unit/Console/Command/DatabaseDropCommandTest.php index 14c208aef..deaee5a87 100644 --- a/tests/Unit/Console/Command/DatabaseDropCommandTest.php +++ b/tests/Unit/Console/Command/DatabaseDropCommandTest.php @@ -7,13 +7,14 @@ use Doctrine\DBAL\Connection; use Patchlevel\EventSourcing\Console\Command\DatabaseDropCommand; use Patchlevel\EventSourcing\Console\DoctrineHelper; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use RuntimeException; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; -/** @covers \Patchlevel\EventSourcing\Console\Command\DatabaseDropCommand */ +#[CoversClass(DatabaseDropCommand::class)] final class DatabaseDropCommandTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Console/Command/SchemaCreateCommandTest.php b/tests/Unit/Console/Command/SchemaCreateCommandTest.php index 7e8fea4d3..feaf0c22b 100644 --- a/tests/Unit/Console/Command/SchemaCreateCommandTest.php +++ b/tests/Unit/Console/Command/SchemaCreateCommandTest.php @@ -7,12 +7,13 @@ use Patchlevel\EventSourcing\Console\Command\SchemaCreateCommand; use Patchlevel\EventSourcing\Schema\DryRunSchemaDirector; use Patchlevel\EventSourcing\Schema\SchemaDirector; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; -/** @covers \Patchlevel\EventSourcing\Console\Command\SchemaCreateCommand */ +#[CoversClass(SchemaCreateCommand::class)] final class SchemaCreateCommandTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Console/Command/SchemaDropCommandTest.php b/tests/Unit/Console/Command/SchemaDropCommandTest.php index 018f5c850..cd4656aed 100644 --- a/tests/Unit/Console/Command/SchemaDropCommandTest.php +++ b/tests/Unit/Console/Command/SchemaDropCommandTest.php @@ -7,12 +7,13 @@ use Patchlevel\EventSourcing\Console\Command\SchemaDropCommand; use Patchlevel\EventSourcing\Schema\DryRunSchemaDirector; use Patchlevel\EventSourcing\Schema\SchemaDirector; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; -/** @covers \Patchlevel\EventSourcing\Console\Command\SchemaDropCommand */ +#[CoversClass(SchemaDropCommand::class)] final class SchemaDropCommandTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Console/Command/SchemaUpdateCommandTest.php b/tests/Unit/Console/Command/SchemaUpdateCommandTest.php index eedf5dbe8..c8471a727 100644 --- a/tests/Unit/Console/Command/SchemaUpdateCommandTest.php +++ b/tests/Unit/Console/Command/SchemaUpdateCommandTest.php @@ -7,12 +7,13 @@ use Patchlevel\EventSourcing\Console\Command\SchemaUpdateCommand; use Patchlevel\EventSourcing\Schema\DryRunSchemaDirector; use Patchlevel\EventSourcing\Schema\SchemaDirector; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; -/** @covers \Patchlevel\EventSourcing\Console\Command\SchemaUpdateCommand */ +#[CoversClass(SchemaUpdateCommand::class)] final class SchemaUpdateCommandTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Console/Command/ShowAggregateCommandTest.php b/tests/Unit/Console/Command/ShowAggregateCommandTest.php index 898676c49..1a32da420 100644 --- a/tests/Unit/Console/Command/ShowAggregateCommandTest.php +++ b/tests/Unit/Console/Command/ShowAggregateCommandTest.php @@ -22,6 +22,7 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Component\Console\Exception\MissingInputException; @@ -29,7 +30,7 @@ use Symfony\Component\Console\Output\BufferedOutput; use Symfony\Component\Console\Tester\CommandTester; -/** @covers \Patchlevel\EventSourcing\Console\Command\ShowAggregateCommand */ +#[CoversClass(ShowAggregateCommand::class)] final class ShowAggregateCommandTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Console/DoctrineHelperTest.php b/tests/Unit/Console/DoctrineHelperTest.php index f4faaf0da..2ab021ecf 100644 --- a/tests/Unit/Console/DoctrineHelperTest.php +++ b/tests/Unit/Console/DoctrineHelperTest.php @@ -9,10 +9,11 @@ use Doctrine\DBAL\Schema\AbstractSchemaManager; use InvalidArgumentException; use Patchlevel\EventSourcing\Console\DoctrineHelper; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Console\DoctrineHelper */ +#[CoversClass(DoctrineHelper::class)] final class DoctrineHelperTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Console/InputHelperTest.php b/tests/Unit/Console/InputHelperTest.php index 66f1113f3..2bd2787bf 100644 --- a/tests/Unit/Console/InputHelperTest.php +++ b/tests/Unit/Console/InputHelperTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Console\InputHelper; use Patchlevel\EventSourcing\Console\InvalidArgumentGiven; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Console\InputHelper */ +#[CoversClass(InputHelper::class)] final class InputHelperTest extends TestCase { public function testValidString(): void diff --git a/tests/Unit/Console/InvalidArgumentGivenTest.php b/tests/Unit/Console/InvalidArgumentGivenTest.php index 7ce35cb07..5ad13c0de 100644 --- a/tests/Unit/Console/InvalidArgumentGivenTest.php +++ b/tests/Unit/Console/InvalidArgumentGivenTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Console; use Patchlevel\EventSourcing\Console\InvalidArgumentGiven; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Console\InvalidArgumentGiven */ +#[CoversClass(InvalidArgumentGiven::class)] final class InvalidArgumentGivenTest extends TestCase { public function testException(): void diff --git a/tests/Unit/Console/OutputStyleTest.php b/tests/Unit/Console/OutputStyleTest.php index 02fd96f44..0817e543a 100644 --- a/tests/Unit/Console/OutputStyleTest.php +++ b/tests/Unit/Console/OutputStyleTest.php @@ -16,13 +16,14 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Header\FooHeader; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; -/** @covers \Patchlevel\EventSourcing\Console\OutputStyle */ +#[CoversClass(OutputStyle::class)] final class OutputStyleTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/EventBus/AttributeListenerProviderTest.php b/tests/Unit/EventBus/AttributeListenerProviderTest.php index 7fee41ed0..0079bd009 100644 --- a/tests/Unit/EventBus/AttributeListenerProviderTest.php +++ b/tests/Unit/EventBus/AttributeListenerProviderTest.php @@ -10,9 +10,10 @@ use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\EventBus\AttributeListenerProvider */ +#[CoversClass(AttributeListenerProvider::class)] final class AttributeListenerProviderTest extends TestCase { public function testProvideNothing(): void diff --git a/tests/Unit/EventBus/DefaultConsumerTest.php b/tests/Unit/EventBus/DefaultConsumerTest.php index 895b4afcc..3a2b5413e 100644 --- a/tests/Unit/EventBus/DefaultConsumerTest.php +++ b/tests/Unit/EventBus/DefaultConsumerTest.php @@ -12,10 +12,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\EventBus\DefaultConsumer */ +#[CoversClass(DefaultConsumer::class)] final class DefaultConsumerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/EventBus/DefaultEventBusTest.php b/tests/Unit/EventBus/DefaultEventBusTest.php index 55727c6c4..edd90da65 100644 --- a/tests/Unit/EventBus/DefaultEventBusTest.php +++ b/tests/Unit/EventBus/DefaultEventBusTest.php @@ -13,10 +13,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\EventBus\DefaultEventBus */ +#[CoversClass(DefaultEventBus::class)] final class DefaultEventBusTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/EventBus/ListenerDescriptorTest.php b/tests/Unit/EventBus/ListenerDescriptorTest.php index 5b705b532..3aa7639e6 100644 --- a/tests/Unit/EventBus/ListenerDescriptorTest.php +++ b/tests/Unit/EventBus/ListenerDescriptorTest.php @@ -6,10 +6,11 @@ use Patchlevel\EventSourcing\EventBus\ListenerDescriptor; use Patchlevel\EventSourcing\Tests\Unit\Fixture\DummyListener; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\EventBus\ListenerDescriptor */ +#[CoversClass(ListenerDescriptor::class)] final class ListenerDescriptorTest extends TestCase { public function testObjectMethod(): void diff --git a/tests/Unit/EventBus/Psr14EventBusTest.php b/tests/Unit/EventBus/Psr14EventBusTest.php index 7fbdfef50..7ba35afba 100644 --- a/tests/Unit/EventBus/Psr14EventBusTest.php +++ b/tests/Unit/EventBus/Psr14EventBusTest.php @@ -9,11 +9,12 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Psr\EventDispatcher\EventDispatcherInterface; -/** @covers \Patchlevel\EventSourcing\EventBus\Psr14EventBus */ +#[CoversClass(Psr14EventBus::class)] final class Psr14EventBusTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Message/HeaderNotFoundTest.php b/tests/Unit/Message/HeaderNotFoundTest.php index 06fe1c0a6..7ecc16d23 100644 --- a/tests/Unit/Message/HeaderNotFoundTest.php +++ b/tests/Unit/Message/HeaderNotFoundTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Message; use Patchlevel\EventSourcing\Message\HeaderNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\HeaderNotFound */ +#[CoversClass(HeaderNotFound::class)] final class HeaderNotFoundTest extends TestCase { public function testNotFound(): void diff --git a/tests/Unit/Message/MessageTest.php b/tests/Unit/Message/MessageTest.php index c901c1641..06718d9d8 100644 --- a/tests/Unit/Message/MessageTest.php +++ b/tests/Unit/Message/MessageTest.php @@ -13,9 +13,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Message */ +#[CoversClass(Message::class)] final class MessageTest extends TestCase { public function testMessage(): void diff --git a/tests/Unit/Message/PipeTest.php b/tests/Unit/Message/PipeTest.php index 1ffcf4d51..ee6ef4817 100644 --- a/tests/Unit/Message/PipeTest.php +++ b/tests/Unit/Message/PipeTest.php @@ -14,12 +14,13 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use function iterator_to_array; -/** @covers \Patchlevel\EventSourcing\Message\Pipe */ +#[CoversClass(Pipe::class)] final class PipeTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Message/ReducerTest.php b/tests/Unit/Message/ReducerTest.php index edfb1a149..34f3478bf 100644 --- a/tests/Unit/Message/ReducerTest.php +++ b/tests/Unit/Message/ReducerTest.php @@ -12,12 +12,13 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use function count; -/** @covers \Patchlevel\EventSourcing\Message\Reducer */ +#[CoversClass(Reducer::class)] final class ReducerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Message/Serializer/DefaultHeadersSerializerTest.php b/tests/Unit/Message/Serializer/DefaultHeadersSerializerTest.php index 976e66f1a..408fa3d8c 100644 --- a/tests/Unit/Message/Serializer/DefaultHeadersSerializerTest.php +++ b/tests/Unit/Message/Serializer/DefaultHeadersSerializerTest.php @@ -11,10 +11,11 @@ use Patchlevel\EventSourcing\Serializer\Encoder\JsonEncoder; use Patchlevel\EventSourcing\Store\ArchivedHeader; use Patchlevel\Hydrator\MetadataHydrator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer */ +#[CoversClass(DefaultHeadersSerializer::class)] final class DefaultHeadersSerializerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Message/Translator/AggregateToStreamHeaderTranslatorTest.php b/tests/Unit/Message/Translator/AggregateToStreamHeaderTranslatorTest.php index 52727eacb..11f34b90b 100644 --- a/tests/Unit/Message/Translator/AggregateToStreamHeaderTranslatorTest.php +++ b/tests/Unit/Message/Translator/AggregateToStreamHeaderTranslatorTest.php @@ -14,10 +14,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Message\Translator\AggregateToStreamHeaderTranslator */ +#[CoversClass(AggregateToStreamHeaderTranslator::class)] final class AggregateToStreamHeaderTranslatorTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Message/Translator/ChainTranslatorTest.php b/tests/Unit/Message/Translator/ChainTranslatorTest.php index 96464d359..9fcc173cc 100644 --- a/tests/Unit/Message/Translator/ChainTranslatorTest.php +++ b/tests/Unit/Message/Translator/ChainTranslatorTest.php @@ -10,10 +10,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Message\Translator\ChainTranslator */ +#[CoversClass(ChainTranslator::class)] final class ChainTranslatorTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Message/Translator/ClosureTranslatorTest.php b/tests/Unit/Message/Translator/ClosureTranslatorTest.php index 814e7a2b5..9fd294b55 100644 --- a/tests/Unit/Message/Translator/ClosureTranslatorTest.php +++ b/tests/Unit/Message/Translator/ClosureTranslatorTest.php @@ -9,9 +9,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\ClosureMiddleware */ +#[CoversClass(ClosureMiddleware::class)] final class ClosureTranslatorTest extends TestCase { public function testClosure(): void diff --git a/tests/Unit/Message/Translator/ExcludeEventTranslatorTest.php b/tests/Unit/Message/Translator/ExcludeEventTranslatorTest.php index 773997448..65082ad2f 100644 --- a/tests/Unit/Message/Translator/ExcludeEventTranslatorTest.php +++ b/tests/Unit/Message/Translator/ExcludeEventTranslatorTest.php @@ -10,9 +10,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\ExcludeEventTranslator */ +#[CoversClass(ExcludeEventTranslator::class)] final class ExcludeEventTranslatorTest extends TestCase { public function testDeleteEvent(): void diff --git a/tests/Unit/Message/Translator/ExcludeEventWithHeaderTranslatorTest.php b/tests/Unit/Message/Translator/ExcludeEventWithHeaderTranslatorTest.php index f1139f699..2882b7a48 100644 --- a/tests/Unit/Message/Translator/ExcludeEventWithHeaderTranslatorTest.php +++ b/tests/Unit/Message/Translator/ExcludeEventWithHeaderTranslatorTest.php @@ -10,9 +10,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\ExcludeEventWithHeaderTranslator */ +#[CoversClass(ExcludeEventWithHeaderTranslator::class)] final class ExcludeEventWithHeaderTranslatorTest extends TestCase { public function testExcludedEvent(): void diff --git a/tests/Unit/Message/Translator/FilterEventTranslatorTest.php b/tests/Unit/Message/Translator/FilterEventTranslatorTest.php index 119a61a6f..17a981c50 100644 --- a/tests/Unit/Message/Translator/FilterEventTranslatorTest.php +++ b/tests/Unit/Message/Translator/FilterEventTranslatorTest.php @@ -10,9 +10,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\FilterEventTranslator */ +#[CoversClass(FilterEventTranslator::class)] final class FilterEventTranslatorTest extends TestCase { public function testPositive(): void diff --git a/tests/Unit/Message/Translator/IncludeEventTranslatorTest.php b/tests/Unit/Message/Translator/IncludeEventTranslatorTest.php index 54458f198..f2351e6dc 100644 --- a/tests/Unit/Message/Translator/IncludeEventTranslatorTest.php +++ b/tests/Unit/Message/Translator/IncludeEventTranslatorTest.php @@ -10,9 +10,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\IncludeEventTranslator */ +#[CoversClass(IncludeEventTranslator::class)] final class IncludeEventTranslatorTest extends TestCase { public function testFilterEvent(): void diff --git a/tests/Unit/Message/Translator/IncludeEventWithHeaderTranslatorTest.php b/tests/Unit/Message/Translator/IncludeEventWithHeaderTranslatorTest.php index e7f23fab7..962250f9c 100644 --- a/tests/Unit/Message/Translator/IncludeEventWithHeaderTranslatorTest.php +++ b/tests/Unit/Message/Translator/IncludeEventWithHeaderTranslatorTest.php @@ -10,9 +10,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\IncludeEventWithHeaderTranslator */ +#[CoversClass(IncludeEventWithHeaderTranslator::class)] final class IncludeEventWithHeaderTranslatorTest extends TestCase { public function testExcludedEvent(): void diff --git a/tests/Unit/Message/Translator/RecalculatePlayheadTranslatorTest.php b/tests/Unit/Message/Translator/RecalculatePlayheadTranslatorTest.php index 90b40d2fd..f6a423500 100644 --- a/tests/Unit/Message/Translator/RecalculatePlayheadTranslatorTest.php +++ b/tests/Unit/Message/Translator/RecalculatePlayheadTranslatorTest.php @@ -11,9 +11,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\RecalculatePlayheadTranslator */ +#[CoversClass(RecalculatePlayheadTranslator::class)] final class RecalculatePlayheadTranslatorTest extends TestCase { public function testRecalculatePlayhead(): void diff --git a/tests/Unit/Message/Translator/ReplaceEventTranslatorTest.php b/tests/Unit/Message/Translator/ReplaceEventTranslatorTest.php index 6a5c2c731..3db6fe68d 100644 --- a/tests/Unit/Message/Translator/ReplaceEventTranslatorTest.php +++ b/tests/Unit/Message/Translator/ReplaceEventTranslatorTest.php @@ -11,9 +11,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\ReplaceEventTranslator */ +#[CoversClass(ReplaceEventTranslator::class)] final class ReplaceEventTranslatorTest extends TestCase { public function testReplace(): void diff --git a/tests/Unit/Message/Translator/UntilEventTranslatorTest.php b/tests/Unit/Message/Translator/UntilEventTranslatorTest.php index e1c8c3e1b..35918da7b 100644 --- a/tests/Unit/Message/Translator/UntilEventTranslatorTest.php +++ b/tests/Unit/Message/Translator/UntilEventTranslatorTest.php @@ -11,9 +11,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Message\Translator\UntilEventTranslator */ +#[CoversClass(UntilEventTranslator::class)] final class UntilEventTranslatorTest extends TestCase { public function testPositive(): void diff --git a/tests/Unit/Metadata/Aggregate/AggregateRootRegistryTest.php b/tests/Unit/Metadata/Aggregate/AggregateRootRegistryTest.php index 9f14db758..7d2a732d9 100644 --- a/tests/Unit/Metadata/Aggregate/AggregateRootRegistryTest.php +++ b/tests/Unit/Metadata/Aggregate/AggregateRootRegistryTest.php @@ -8,9 +8,10 @@ use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootNameNotRegistered; use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry */ +#[CoversClass(AggregateRootRegistry::class)] final class AggregateRootRegistryTest extends TestCase { public function testEmpty(): void diff --git a/tests/Unit/Metadata/Aggregate/AttributeAggregateMetadataFactoryTest.php b/tests/Unit/Metadata/Aggregate/AttributeAggregateMetadataFactoryTest.php index 4a47588cc..b69856d6b 100644 --- a/tests/Unit/Metadata/Aggregate/AttributeAggregateMetadataFactoryTest.php +++ b/tests/Unit/Metadata/Aggregate/AttributeAggregateMetadataFactoryTest.php @@ -20,9 +20,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithEmptyApply; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithStream; use Patchlevel\EventSourcing\Tests\Unit\Fixture\SplittingEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Metadata\AggregateRoot\AttributeAggregateRootMetadataFactory */ +#[CoversClass(AttributeAggregateRootMetadataFactory::class)] final class AttributeAggregateMetadataFactoryTest extends TestCase { public function testProfile(): void diff --git a/tests/Unit/Metadata/Aggregate/AttributeAggregateRootRegistryFactoryTest.php b/tests/Unit/Metadata/Aggregate/AttributeAggregateRootRegistryFactoryTest.php index c6a42ab8a..619f1fe0d 100644 --- a/tests/Unit/Metadata/Aggregate/AttributeAggregateRootRegistryFactoryTest.php +++ b/tests/Unit/Metadata/Aggregate/AttributeAggregateRootRegistryFactoryTest.php @@ -8,9 +8,10 @@ use Patchlevel\EventSourcing\Metadata\AggregateRoot\AttributeAggregateRootRegistryFactory; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Message; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Metadata\AggregateRoot\AttributeAggregateRootRegistryFactory */ +#[CoversClass(AttributeAggregateRootRegistryFactory::class)] final class AttributeAggregateRootRegistryFactoryTest extends TestCase { public function testCreateRegistry(): void diff --git a/tests/Unit/Metadata/ClassFinderTest.php b/tests/Unit/Metadata/ClassFinderTest.php index 13a86379b..16f256f44 100644 --- a/tests/Unit/Metadata/ClassFinderTest.php +++ b/tests/Unit/Metadata/ClassFinderTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Metadata; use Patchlevel\EventSourcing\Metadata\ClassFinder; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Metadata\ClassFinder */ +#[CoversClass(ClassFinder::class)] final class ClassFinderTest extends TestCase { public function testEmpty(): void diff --git a/tests/Unit/Metadata/Event/AttributeEventMetadataFactoryTest.php b/tests/Unit/Metadata/Event/AttributeEventMetadataFactoryTest.php index 6087ec125..2b1568710 100644 --- a/tests/Unit/Metadata/Event/AttributeEventMetadataFactoryTest.php +++ b/tests/Unit/Metadata/Event/AttributeEventMetadataFactoryTest.php @@ -8,9 +8,10 @@ use Patchlevel\EventSourcing\Attribute\SplitStream; use Patchlevel\EventSourcing\Metadata\Event\AttributeEventMetadataFactory; use Patchlevel\EventSourcing\Metadata\Event\ClassIsNotAnEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Metadata\Event\AttributeEventMetadataFactory */ +#[CoversClass(AttributeEventMetadataFactory::class)] final class AttributeEventMetadataFactoryTest extends TestCase { public function testEmptyEvent(): void diff --git a/tests/Unit/Metadata/Event/AttributeEventRegistryFactoryTest.php b/tests/Unit/Metadata/Event/AttributeEventRegistryFactoryTest.php index 4fb379795..d4c68f210 100644 --- a/tests/Unit/Metadata/Event/AttributeEventRegistryFactoryTest.php +++ b/tests/Unit/Metadata/Event/AttributeEventRegistryFactoryTest.php @@ -8,9 +8,10 @@ use Patchlevel\EventSourcing\Metadata\Event\EventAlreadyInRegistry; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Message; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Metadata\Event\AttributeEventRegistryFactory */ +#[CoversClass(AttributeEventRegistryFactory::class)] final class AttributeEventRegistryFactoryTest extends TestCase { public function testCreateRegistry(): void diff --git a/tests/Unit/Metadata/Event/EventRegistryTest.php b/tests/Unit/Metadata/Event/EventRegistryTest.php index ee7a71fee..bded4ef02 100644 --- a/tests/Unit/Metadata/Event/EventRegistryTest.php +++ b/tests/Unit/Metadata/Event/EventRegistryTest.php @@ -8,9 +8,10 @@ use Patchlevel\EventSourcing\Metadata\Event\EventNameNotRegistered; use Patchlevel\EventSourcing\Metadata\Event\EventRegistry; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Metadata\Event\EventRegistry */ +#[CoversClass(EventRegistry::class)] final class EventRegistryTest extends TestCase { public function testEmpty(): void diff --git a/tests/Unit/Metadata/Subscriber/AttributeSubscriberMetadataFactoryTest.php b/tests/Unit/Metadata/Subscriber/AttributeSubscriberMetadataFactoryTest.php index ce3fd2f2b..cf33e29bb 100644 --- a/tests/Unit/Metadata/Subscriber/AttributeSubscriberMetadataFactoryTest.php +++ b/tests/Unit/Metadata/Subscriber/AttributeSubscriberMetadataFactoryTest.php @@ -22,10 +22,11 @@ use Patchlevel\EventSourcing\Subscription\RunMode; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Stringable; -/** @covers \Patchlevel\EventSourcing\Metadata\Subscriber\AttributeSubscriberMetadataFactory */ +#[CoversClass(AttributeSubscriberMetadataFactory::class)] final class AttributeSubscriberMetadataFactoryTest extends TestCase { public function testNotASubscriber(): void diff --git a/tests/Unit/Repository/DefaultRepositoryManagerTest.php b/tests/Unit/Repository/DefaultRepositoryManagerTest.php index 64a782f1a..76cf83606 100644 --- a/tests/Unit/Repository/DefaultRepositoryManagerTest.php +++ b/tests/Unit/Repository/DefaultRepositoryManagerTest.php @@ -11,10 +11,11 @@ use Patchlevel\EventSourcing\Store\Store; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithSnapshot; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Repository\DefaultRepositoryManager */ +#[CoversClass(DefaultRepositoryManager::class)] final class DefaultRepositoryManagerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Repository/DefaultRepositoryTest.php b/tests/Unit/Repository/DefaultRepositoryTest.php index b99af2bc1..c61370e04 100644 --- a/tests/Unit/Repository/DefaultRepositoryTest.php +++ b/tests/Unit/Repository/DefaultRepositoryTest.php @@ -41,13 +41,14 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithSnapshot; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithStream; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; use RuntimeException; use Throwable; -/** @covers \Patchlevel\EventSourcing\Repository\DefaultRepository */ +#[CoversClass(DefaultRepository::class)] final class DefaultRepositoryTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Repository/MessageDecorator/ChainMessageDecoratorTest.php b/tests/Unit/Repository/MessageDecorator/ChainMessageDecoratorTest.php index 856304004..a4363c779 100644 --- a/tests/Unit/Repository/MessageDecorator/ChainMessageDecoratorTest.php +++ b/tests/Unit/Repository/MessageDecorator/ChainMessageDecoratorTest.php @@ -10,10 +10,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Repository\MessageDecorator\ChainMessageDecorator */ +#[CoversClass(ChainMessageDecorator::class)] final class ChainMessageDecoratorTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Repository/MessageDecorator/SplitStreamDecoratorTest.php b/tests/Unit/Repository/MessageDecorator/SplitStreamDecoratorTest.php index 1f24a9238..b95ca207e 100644 --- a/tests/Unit/Repository/MessageDecorator/SplitStreamDecoratorTest.php +++ b/tests/Unit/Repository/MessageDecorator/SplitStreamDecoratorTest.php @@ -12,10 +12,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\SplittingEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Repository\MessageDecorator\SplitStreamDecorator */ +#[CoversClass(SplitStreamDecorator::class)] final class SplitStreamDecoratorTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Schema/ChainDoctrineSchemaConfiguratorTest.php b/tests/Unit/Schema/ChainDoctrineSchemaConfiguratorTest.php index 7e85ca226..5f4e1f5e7 100644 --- a/tests/Unit/Schema/ChainDoctrineSchemaConfiguratorTest.php +++ b/tests/Unit/Schema/ChainDoctrineSchemaConfiguratorTest.php @@ -8,10 +8,11 @@ use Doctrine\DBAL\Schema\Schema; use Patchlevel\EventSourcing\Schema\ChainDoctrineSchemaConfigurator; use Patchlevel\EventSourcing\Schema\DoctrineSchemaConfigurator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Schema\ChainDoctrineSchemaConfigurator */ +#[CoversClass(ChainDoctrineSchemaConfigurator::class)] final class ChainDoctrineSchemaConfiguratorTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Schema/DoctrineMigrationSchemaProviderTest.php b/tests/Unit/Schema/DoctrineMigrationSchemaProviderTest.php index b5e268489..250667217 100644 --- a/tests/Unit/Schema/DoctrineMigrationSchemaProviderTest.php +++ b/tests/Unit/Schema/DoctrineMigrationSchemaProviderTest.php @@ -7,10 +7,11 @@ use Doctrine\DBAL\Schema\Schema; use Patchlevel\EventSourcing\Schema\DoctrineMigrationSchemaProvider; use Patchlevel\EventSourcing\Schema\DoctrineSchemaProvider; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Schema\DoctrineMigrationSchemaProvider */ +#[CoversClass(DoctrineMigrationSchemaProvider::class)] final class DoctrineMigrationSchemaProviderTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Schema/DoctrineSchemaDirectorTest.php b/tests/Unit/Schema/DoctrineSchemaDirectorTest.php index 49ea9ae14..20b18cab5 100644 --- a/tests/Unit/Schema/DoctrineSchemaDirectorTest.php +++ b/tests/Unit/Schema/DoctrineSchemaDirectorTest.php @@ -13,11 +13,12 @@ use Doctrine\DBAL\Schema\SchemaDiff; use Patchlevel\EventSourcing\Schema\DoctrineSchemaConfigurator; use Patchlevel\EventSourcing\Schema\DoctrineSchemaDirector; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Schema\DoctrineSchemaDirector */ +#[CoversClass(DoctrineSchemaDirector::class)] final class DoctrineSchemaDirectorTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Schema/DoctrineSchemaListenerTest.php b/tests/Unit/Schema/DoctrineSchemaListenerTest.php index 4cca82c82..c0ee98616 100644 --- a/tests/Unit/Schema/DoctrineSchemaListenerTest.php +++ b/tests/Unit/Schema/DoctrineSchemaListenerTest.php @@ -10,10 +10,11 @@ use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs; use Patchlevel\EventSourcing\Schema\DoctrineSchemaConfigurator; use Patchlevel\EventSourcing\Schema\DoctrineSchemaListener; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Schema\DoctrineSchemaListener */ +#[CoversClass(DoctrineSchemaListener::class)] final class DoctrineSchemaListenerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Schema/DoctrineSchemaSubscriberTest.php b/tests/Unit/Schema/DoctrineSchemaSubscriberTest.php index 582193ca4..541aed25a 100644 --- a/tests/Unit/Schema/DoctrineSchemaSubscriberTest.php +++ b/tests/Unit/Schema/DoctrineSchemaSubscriberTest.php @@ -10,10 +10,11 @@ use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs; use Patchlevel\EventSourcing\Schema\DoctrineSchemaConfigurator; use Patchlevel\EventSourcing\Schema\DoctrineSchemaSubscriber; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Schema\DoctrineSchemaSubscriber */ +#[CoversClass(DoctrineSchemaSubscriber::class)] final class DoctrineSchemaSubscriberTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Serializer/DefaultEventSerializerTest.php b/tests/Unit/Serializer/DefaultEventSerializerTest.php index 1112660fb..cba9905c6 100644 --- a/tests/Unit/Serializer/DefaultEventSerializerTest.php +++ b/tests/Unit/Serializer/DefaultEventSerializerTest.php @@ -15,9 +15,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\Hydrator\MetadataHydrator; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Serializer\DefaultEventSerializer */ +#[CoversClass(DefaultEventSerializer::class)] final class DefaultEventSerializerTest extends TestCase { private DefaultEventSerializer $serializer; diff --git a/tests/Unit/Serializer/Encoder/DecodeNotPossibleTest.php b/tests/Unit/Serializer/Encoder/DecodeNotPossibleTest.php index 836e39404..e2383afcf 100644 --- a/tests/Unit/Serializer/Encoder/DecodeNotPossibleTest.php +++ b/tests/Unit/Serializer/Encoder/DecodeNotPossibleTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Serializer\Encoder; use Patchlevel\EventSourcing\Serializer\Encoder\DecodeNotPossible; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Serializer\Encoder\DecodeNotPossible */ +#[CoversClass(DecodeNotPossible::class)] final class DecodeNotPossibleTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Serializer/Encoder/EncodeNotPossibleTest.php b/tests/Unit/Serializer/Encoder/EncodeNotPossibleTest.php index 4fde86908..c95ca1359 100644 --- a/tests/Unit/Serializer/Encoder/EncodeNotPossibleTest.php +++ b/tests/Unit/Serializer/Encoder/EncodeNotPossibleTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Serializer\Encoder; use Patchlevel\EventSourcing\Serializer\Encoder\EncodeNotPossible; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Serializer\Encoder\EncodeNotPossible */ +#[CoversClass(EncodeNotPossible::class)] final class EncodeNotPossibleTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Serializer/Encoder/JsonEncoderTest.php b/tests/Unit/Serializer/Encoder/JsonEncoderTest.php index c77f882d7..512463165 100644 --- a/tests/Unit/Serializer/Encoder/JsonEncoderTest.php +++ b/tests/Unit/Serializer/Encoder/JsonEncoderTest.php @@ -9,9 +9,10 @@ use Patchlevel\EventSourcing\Serializer\Encoder\JsonEncoder; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Serializer\Encoder\JsonEncoder */ +#[CoversClass(JsonEncoder::class)] final class JsonEncoderTest extends TestCase { private JsonEncoder $encoder; diff --git a/tests/Unit/Serializer/SerializedEventTest.php b/tests/Unit/Serializer/SerializedEventTest.php index f4413ab69..f05ef05b2 100644 --- a/tests/Unit/Serializer/SerializedEventTest.php +++ b/tests/Unit/Serializer/SerializedEventTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Serializer; use Patchlevel\EventSourcing\Serializer\SerializedEvent; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Serializer\SerializedEvent */ +#[CoversClass(SerializedEvent::class)] final class SerializedEventTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Serializer/Upcast/UpcastTest.php b/tests/Unit/Serializer/Upcast/UpcastTest.php index deb996189..17fceff1a 100644 --- a/tests/Unit/Serializer/Upcast/UpcastTest.php +++ b/tests/Unit/Serializer/Upcast/UpcastTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Serializer\Upcast; use Patchlevel\EventSourcing\Serializer\Upcast\Upcast; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers Patchlevel\EventSourcing\Serializer\Upcast\Upcast */ +#[CoversClass(Patchlevel\EventSourcing\Serializer\Upcast\Upcast::class)] final class UpcastTest extends TestCase { public function testReplaceEventName(): void diff --git a/tests/Unit/Serializer/Upcast/UpcasterChainTest.php b/tests/Unit/Serializer/Upcast/UpcasterChainTest.php index f2f26ec9f..df2995486 100644 --- a/tests/Unit/Serializer/Upcast/UpcasterChainTest.php +++ b/tests/Unit/Serializer/Upcast/UpcasterChainTest.php @@ -7,9 +7,10 @@ use Patchlevel\EventSourcing\Serializer\Upcast\Upcast; use Patchlevel\EventSourcing\Serializer\Upcast\Upcaster; use Patchlevel\EventSourcing\Serializer\Upcast\UpcasterChain; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Serializer\Upcast\UpcasterChain */ +#[CoversClass(UpcasterChain::class)] final class UpcasterChainTest extends TestCase { public function testChainSuccessful(): void diff --git a/tests/Unit/Snapshot/Adapter/InMemorySnapshotAdapterTest.php b/tests/Unit/Snapshot/Adapter/InMemorySnapshotAdapterTest.php index a89905ea2..bc410cea3 100644 --- a/tests/Unit/Snapshot/Adapter/InMemorySnapshotAdapterTest.php +++ b/tests/Unit/Snapshot/Adapter/InMemorySnapshotAdapterTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Snapshot\Adapter\InMemorySnapshotAdapter; use Patchlevel\EventSourcing\Snapshot\Adapter\SnapshotNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Snapshot\Adapter\InMemorySnapshotAdapter */ +#[CoversClass(InMemorySnapshotAdapter::class)] final class InMemorySnapshotAdapterTest extends TestCase { public function testInMemorySnapshotStore(): void diff --git a/tests/Unit/Snapshot/Adapter/Psr16SnapshotAdapterTest.php b/tests/Unit/Snapshot/Adapter/Psr16SnapshotAdapterTest.php index 6871bfab1..92253addd 100644 --- a/tests/Unit/Snapshot/Adapter/Psr16SnapshotAdapterTest.php +++ b/tests/Unit/Snapshot/Adapter/Psr16SnapshotAdapterTest.php @@ -6,11 +6,12 @@ use Patchlevel\EventSourcing\Snapshot\Adapter\Psr16SnapshotAdapter; use Patchlevel\EventSourcing\Snapshot\Adapter\SnapshotNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Psr\SimpleCache\CacheInterface; -/** @covers \Patchlevel\EventSourcing\Snapshot\Adapter\Psr16SnapshotAdapter */ +#[CoversClass(Psr16SnapshotAdapter::class)] final class Psr16SnapshotAdapterTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Snapshot/Adapter/Psr6SnapshotAdapterTest.php b/tests/Unit/Snapshot/Adapter/Psr6SnapshotAdapterTest.php index d530b9b18..fe4cb340d 100644 --- a/tests/Unit/Snapshot/Adapter/Psr6SnapshotAdapterTest.php +++ b/tests/Unit/Snapshot/Adapter/Psr6SnapshotAdapterTest.php @@ -6,12 +6,13 @@ use Patchlevel\EventSourcing\Snapshot\Adapter\Psr6SnapshotAdapter; use Patchlevel\EventSourcing\Snapshot\Adapter\SnapshotNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Psr\Cache\CacheItemInterface; use Psr\Cache\CacheItemPoolInterface; -/** @covers \Patchlevel\EventSourcing\Snapshot\Adapter\Psr6SnapshotAdapter */ +#[CoversClass(Psr6SnapshotAdapter::class)] final class Psr6SnapshotAdapterTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Snapshot/Adapter/SnapshotNotFoundTest.php b/tests/Unit/Snapshot/Adapter/SnapshotNotFoundTest.php index 98d4f322a..93044a2b2 100644 --- a/tests/Unit/Snapshot/Adapter/SnapshotNotFoundTest.php +++ b/tests/Unit/Snapshot/Adapter/SnapshotNotFoundTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Snapshot\Adapter; use Patchlevel\EventSourcing\Snapshot\Adapter\SnapshotNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Snapshot\Adapter\SnapshotNotFound */ +#[CoversClass(SnapshotNotFound::class)] final class SnapshotNotFoundTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Snapshot/AdapterNotFoundTest.php b/tests/Unit/Snapshot/AdapterNotFoundTest.php index 0b17c0d81..5c6c6a017 100644 --- a/tests/Unit/Snapshot/AdapterNotFoundTest.php +++ b/tests/Unit/Snapshot/AdapterNotFoundTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Snapshot; use Patchlevel\EventSourcing\Snapshot\AdapterNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Snapshot\AdapterNotFound */ +#[CoversClass(AdapterNotFound::class)] final class AdapterNotFoundTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Snapshot/ArrayAdapterRepositoryTest.php b/tests/Unit/Snapshot/ArrayAdapterRepositoryTest.php index bdfbdaf3d..9f2bb761a 100644 --- a/tests/Unit/Snapshot/ArrayAdapterRepositoryTest.php +++ b/tests/Unit/Snapshot/ArrayAdapterRepositoryTest.php @@ -7,10 +7,11 @@ use Patchlevel\EventSourcing\Snapshot\Adapter\SnapshotAdapter; use Patchlevel\EventSourcing\Snapshot\AdapterNotFound; use Patchlevel\EventSourcing\Snapshot\ArrayAdapterRepository; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Snapshot\ArrayAdapterRepository */ +#[CoversClass(ArrayAdapterRepository::class)] final class ArrayAdapterRepositoryTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Snapshot/DefaultSnapshotStoreTest.php b/tests/Unit/Snapshot/DefaultSnapshotStoreTest.php index 89db921d3..b841ae6e0 100644 --- a/tests/Unit/Snapshot/DefaultSnapshotStoreTest.php +++ b/tests/Unit/Snapshot/DefaultSnapshotStoreTest.php @@ -14,11 +14,12 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithSnapshot; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Snapshot\DefaultSnapshotStore */ +#[CoversClass(DefaultSnapshotStore::class)] final class DefaultSnapshotStoreTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Snapshot/SnapshotNotConfiguredTest.php b/tests/Unit/Snapshot/SnapshotNotConfiguredTest.php index 3a43ae7b4..197d5e382 100644 --- a/tests/Unit/Snapshot/SnapshotNotConfiguredTest.php +++ b/tests/Unit/Snapshot/SnapshotNotConfiguredTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Snapshot\SnapshotNotConfigured; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Snapshot\SnapshotNotConfigured */ +#[CoversClass(SnapshotNotConfigured::class)] final class SnapshotNotConfiguredTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Snapshot/SnapshotNotFoundTest.php b/tests/Unit/Snapshot/SnapshotNotFoundTest.php index ee387fed7..dab026d63 100644 --- a/tests/Unit/Snapshot/SnapshotNotFoundTest.php +++ b/tests/Unit/Snapshot/SnapshotNotFoundTest.php @@ -8,9 +8,10 @@ use Patchlevel\EventSourcing\Aggregate\CustomIdBehaviour; use Patchlevel\EventSourcing\Snapshot\SnapshotNotFound; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Snapshot\SnapshotNotFound */ +#[CoversClass(SnapshotNotFound::class)] final class SnapshotNotFoundTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Snapshot/SnapshotTest.php b/tests/Unit/Snapshot/SnapshotTest.php index 7c558461b..b9185439a 100644 --- a/tests/Unit/Snapshot/SnapshotTest.php +++ b/tests/Unit/Snapshot/SnapshotTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Snapshot\Snapshot; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileWithSnapshot; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Snapshot\Snapshot */ +#[CoversClass(Snapshot::class)] final class SnapshotTest extends TestCase { public function testSnapshot(): void diff --git a/tests/Unit/Snapshot/SnapshotVersionInvalidTest.php b/tests/Unit/Snapshot/SnapshotVersionInvalidTest.php index a2ceb8bf3..b825a7bdc 100644 --- a/tests/Unit/Snapshot/SnapshotVersionInvalidTest.php +++ b/tests/Unit/Snapshot/SnapshotVersionInvalidTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Snapshot; use Patchlevel\EventSourcing\Snapshot\SnapshotVersionInvalid; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Snapshot\SnapshotVersionInvalid */ +#[CoversClass(SnapshotVersionInvalid::class)] final class SnapshotVersionInvalidTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Store/ArrayStreamTest.php b/tests/Unit/Store/ArrayStreamTest.php index 407c3a169..a041db550 100644 --- a/tests/Unit/Store/ArrayStreamTest.php +++ b/tests/Unit/Store/ArrayStreamTest.php @@ -10,12 +10,13 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use function iterator_to_array; -/** @covers \Patchlevel\EventSourcing\Store\ArrayStream */ +#[CoversClass(ArrayStream::class)] final class ArrayStreamTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Store/Crtieria/CriteriaBuilderTest.php b/tests/Unit/Store/Crtieria/CriteriaBuilderTest.php index 83f6d16b2..19bf11ec2 100644 --- a/tests/Unit/Store/Crtieria/CriteriaBuilderTest.php +++ b/tests/Unit/Store/Crtieria/CriteriaBuilderTest.php @@ -12,9 +12,10 @@ use Patchlevel\EventSourcing\Store\Criteria\EventsCriterion; use Patchlevel\EventSourcing\Store\Criteria\FromIndexCriterion; use Patchlevel\EventSourcing\Store\Criteria\FromPlayheadCriterion; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Store\Criteria\CriteriaBuilder */ +#[CoversClass(CriteriaBuilder::class)] final class CriteriaBuilderTest extends TestCase { public function testEmpty(): void diff --git a/tests/Unit/Store/Crtieria/CriteriaTest.php b/tests/Unit/Store/Crtieria/CriteriaTest.php index d8979aa88..dc88d054a 100644 --- a/tests/Unit/Store/Crtieria/CriteriaTest.php +++ b/tests/Unit/Store/Crtieria/CriteriaTest.php @@ -8,9 +8,10 @@ use Patchlevel\EventSourcing\Store\Criteria\AggregateNameCriterion; use Patchlevel\EventSourcing\Store\Criteria\Criteria; use Patchlevel\EventSourcing\Store\Criteria\CriterionNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Store\Criteria\Criteria */ +#[CoversClass(Criteria::class)] final class CriteriaTest extends TestCase { public function testEmpty(): void diff --git a/tests/Unit/Store/DoctrineDbalStoreTest.php b/tests/Unit/Store/DoctrineDbalStoreTest.php index 6d4f5c1b5..dd6af5edc 100644 --- a/tests/Unit/Store/DoctrineDbalStoreTest.php +++ b/tests/Unit/Store/DoctrineDbalStoreTest.php @@ -38,6 +38,7 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileEmailChanged; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use PDO; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresPhp; use PHPUnit\Framework\TestCase; use Prophecy\Argument; @@ -47,7 +48,7 @@ use function iterator_to_array; use function method_exists; -/** @covers \Patchlevel\EventSourcing\Store\DoctrineDbalStore */ +#[CoversClass(DoctrineDbalStore::class)] final class DoctrineDbalStoreTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Store/DoctrineDbalStreamTest.php b/tests/Unit/Store/DoctrineDbalStreamTest.php index 633c2a1d8..cf33c0b33 100644 --- a/tests/Unit/Store/DoctrineDbalStreamTest.php +++ b/tests/Unit/Store/DoctrineDbalStreamTest.php @@ -19,13 +19,14 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Throwable; use function iterator_to_array; -/** @covers \Patchlevel\EventSourcing\Store\DoctrineDbalStoreStream */ +#[CoversClass(DoctrineDbalStoreStream::class)] final class DoctrineDbalStreamTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Store/InMemoryStoreTest.php b/tests/Unit/Store/InMemoryStoreTest.php index 51bdad364..617fbd081 100644 --- a/tests/Unit/Store/InMemoryStoreTest.php +++ b/tests/Unit/Store/InMemoryStoreTest.php @@ -21,13 +21,14 @@ use Patchlevel\EventSourcing\Store\UnsupportedCriterion; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use stdClass; use function iterator_to_array; -/** @covers \Patchlevel\EventSourcing\Store\InMemoryStore */ +#[CoversClass(InMemoryStore::class)] final class InMemoryStoreTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Store/ReadOnlyStoreTest.php b/tests/Unit/Store/ReadOnlyStoreTest.php index 4374e7c71..ae3fe5652 100644 --- a/tests/Unit/Store/ReadOnlyStoreTest.php +++ b/tests/Unit/Store/ReadOnlyStoreTest.php @@ -11,10 +11,11 @@ use Patchlevel\EventSourcing\Store\Store; use Patchlevel\EventSourcing\Store\StoreIsReadOnly; use Patchlevel\EventSourcing\Store\StreamStore; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Store\ReadOnlyStore */ +#[CoversClass(ReadOnlyStore::class)] final class ReadOnlyStoreTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Store/StreamDoctrineDbalStoreTest.php b/tests/Unit/Store/StreamDoctrineDbalStoreTest.php index 668b3ea38..d90085a22 100644 --- a/tests/Unit/Store/StreamDoctrineDbalStoreTest.php +++ b/tests/Unit/Store/StreamDoctrineDbalStoreTest.php @@ -41,6 +41,7 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileEmailChanged; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use PDO; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; @@ -50,7 +51,7 @@ use function iterator_to_array; use function method_exists; -/** @covers \Patchlevel\EventSourcing\Store\StreamDoctrineDbalStore */ +#[CoversClass(StreamDoctrineDbalStore::class)] final class StreamDoctrineDbalStoreTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Store/StreamDoctrineDbalStreamTest.php b/tests/Unit/Store/StreamDoctrineDbalStreamTest.php index a1f378933..1e22f0538 100644 --- a/tests/Unit/Store/StreamDoctrineDbalStreamTest.php +++ b/tests/Unit/Store/StreamDoctrineDbalStreamTest.php @@ -22,13 +22,14 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Throwable; use function iterator_to_array; -/** @covers \Patchlevel\EventSourcing\Store\StreamDoctrineDbalStoreStream */ +#[CoversClass(StreamDoctrineDbalStoreStream::class)] final class StreamDoctrineDbalStreamTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Store/StreamReadOnlyStoreTest.php b/tests/Unit/Store/StreamReadOnlyStoreTest.php index c94889201..d6909514b 100644 --- a/tests/Unit/Store/StreamReadOnlyStoreTest.php +++ b/tests/Unit/Store/StreamReadOnlyStoreTest.php @@ -6,13 +6,15 @@ use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Store\Criteria\Criteria; +use Patchlevel\EventSourcing\Store\ReadOnlyStore; use Patchlevel\EventSourcing\Store\StoreIsReadOnly; use Patchlevel\EventSourcing\Store\StreamReadOnlyStore; use Patchlevel\EventSourcing\Store\StreamStore; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Store\ReadOnlyStore */ +#[CoversClass(ReadOnlyStore::class)] final class StreamReadOnlyStoreTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/Engine/CatchUpSubscriptionEngineTest.php b/tests/Unit/Subscription/Engine/CatchUpSubscriptionEngineTest.php index 8b3ce2489..2833a2f60 100644 --- a/tests/Unit/Subscription/Engine/CatchUpSubscriptionEngineTest.php +++ b/tests/Unit/Subscription/Engine/CatchUpSubscriptionEngineTest.php @@ -11,11 +11,12 @@ use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngine; use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngineCriteria; use Patchlevel\EventSourcing\Subscription\Subscription; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Subscription\Engine\CatchUpSubscriptionEngine */ +#[CoversClass(CatchUpSubscriptionEngine::class)] final class CatchUpSubscriptionEngineTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php b/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php index ee5ed497f..30372e275 100644 --- a/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php +++ b/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php @@ -37,6 +37,7 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; use Patchlevel\EventSourcing\Tests\Unit\Subscription\DummySubscriptionStore; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Prophecy\Argument; @@ -44,7 +45,7 @@ use Psr\Log\NullLogger; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Subscription\Engine\DefaultSubscriptionEngine */ +#[CoversClass(DefaultSubscriptionEngine::class)] final class DefaultSubscriptionEngineTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/Engine/ErrorDetectedTest.php b/tests/Unit/Subscription/Engine/ErrorDetectedTest.php index bf878d9bd..de6d4d2b4 100644 --- a/tests/Unit/Subscription/Engine/ErrorDetectedTest.php +++ b/tests/Unit/Subscription/Engine/ErrorDetectedTest.php @@ -6,10 +6,11 @@ use Patchlevel\EventSourcing\Subscription\Engine\Error; use Patchlevel\EventSourcing\Subscription\Engine\ErrorDetected; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Subscription\Engine\ErrorDetected */ +#[CoversClass(ErrorDetected::class)] final class ErrorDetectedTest extends TestCase { public function testError(): void diff --git a/tests/Unit/Subscription/Engine/SubscriptionManagerTest.php b/tests/Unit/Subscription/Engine/SubscriptionManagerTest.php index 0bc9cd502..f9065808e 100644 --- a/tests/Unit/Subscription/Engine/SubscriptionManagerTest.php +++ b/tests/Unit/Subscription/Engine/SubscriptionManagerTest.php @@ -9,13 +9,14 @@ use Patchlevel\EventSourcing\Subscription\Store\SubscriptionCriteria; use Patchlevel\EventSourcing\Subscription\Store\SubscriptionStore; use Patchlevel\EventSourcing\Subscription\Subscription; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\Argument; use Prophecy\PhpUnit\ProphecyTrait; use function iterator_to_array; -/** @covers \Patchlevel\EventSourcing\Subscription\Engine\SubscriptionManager */ +#[CoversClass(SubscriptionManager::class)] final class SubscriptionManagerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/Engine/ThrowOnErrorSubscriptionEngineTest.php b/tests/Unit/Subscription/Engine/ThrowOnErrorSubscriptionEngineTest.php index 4daca3e25..de62a0429 100644 --- a/tests/Unit/Subscription/Engine/ThrowOnErrorSubscriptionEngineTest.php +++ b/tests/Unit/Subscription/Engine/ThrowOnErrorSubscriptionEngineTest.php @@ -11,11 +11,12 @@ use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngine; use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngineCriteria; use Patchlevel\EventSourcing\Subscription\Engine\ThrowOnErrorSubscriptionEngine; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Subscription\Engine\ThrowOnErrorSubscriptionEngine */ +#[CoversClass(ThrowOnErrorSubscriptionEngine::class)] final class ThrowOnErrorSubscriptionEngineTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/Lookup/LookupTest.php b/tests/Unit/Subscription/Lookup/LookupTest.php index e93e34bc4..0521cdfce 100644 --- a/tests/Unit/Subscription/Lookup/LookupTest.php +++ b/tests/Unit/Subscription/Lookup/LookupTest.php @@ -21,10 +21,11 @@ use Patchlevel\EventSourcing\Store\Store; use Patchlevel\EventSourcing\Subscription\Lookup\Lookup; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Subscription\Lookup\Lookup */ +#[CoversClass(Lookup::class)] final class LookupTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/Repository/RunSubscriptionEngineRepositoryManagerTest.php b/tests/Unit/Subscription/Repository/RunSubscriptionEngineRepositoryManagerTest.php index dfa021ca4..a144abdc0 100644 --- a/tests/Unit/Subscription/Repository/RunSubscriptionEngineRepositoryManagerTest.php +++ b/tests/Unit/Subscription/Repository/RunSubscriptionEngineRepositoryManagerTest.php @@ -9,10 +9,11 @@ use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngine; use Patchlevel\EventSourcing\Subscription\Repository\RunSubscriptionEngineRepositoryManager; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Subscription\Repository\RunSubscriptionEngineRepositoryManager */ +#[CoversClass(RunSubscriptionEngineRepositoryManager::class)] final class RunSubscriptionEngineRepositoryManagerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/Repository/RunSubscriptionEngineRepositoryTest.php b/tests/Unit/Subscription/Repository/RunSubscriptionEngineRepositoryTest.php index f71c99e55..551e8494f 100644 --- a/tests/Unit/Subscription/Repository/RunSubscriptionEngineRepositoryTest.php +++ b/tests/Unit/Subscription/Repository/RunSubscriptionEngineRepositoryTest.php @@ -13,10 +13,11 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Profile; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Subscription\Repository\RunSubscriptionEngineRepository */ +#[CoversClass(RunSubscriptionEngineRepository::class)] final class RunSubscriptionEngineRepositoryTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/RetryStrategy/ClockBasedRetryStrategyTest.php b/tests/Unit/Subscription/RetryStrategy/ClockBasedRetryStrategyTest.php index 966abc8f9..8f6522011 100644 --- a/tests/Unit/Subscription/RetryStrategy/ClockBasedRetryStrategyTest.php +++ b/tests/Unit/Subscription/RetryStrategy/ClockBasedRetryStrategyTest.php @@ -11,10 +11,11 @@ use Patchlevel\EventSourcing\Subscription\RunMode; use Patchlevel\EventSourcing\Subscription\Status; use Patchlevel\EventSourcing\Subscription\Subscription; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\RetryStrategy\ClockBasedRetryStrategy */ +#[CoversClass(ClockBasedRetryStrategy::class)] final class ClockBasedRetryStrategyTest extends TestCase { private ClockBasedRetryStrategy $strategy; diff --git a/tests/Unit/Subscription/RetryStrategy/NoRetryStrategyTest.php b/tests/Unit/Subscription/RetryStrategy/NoRetryStrategyTest.php index fa12aacc7..4bd435bcb 100644 --- a/tests/Unit/Subscription/RetryStrategy/NoRetryStrategyTest.php +++ b/tests/Unit/Subscription/RetryStrategy/NoRetryStrategyTest.php @@ -6,9 +6,10 @@ use Patchlevel\EventSourcing\Subscription\RetryStrategy\NoRetryStrategy; use Patchlevel\EventSourcing\Subscription\Subscription; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\RetryStrategy\NoRetryStrategy */ +#[CoversClass(NoRetryStrategy::class)] final class NoRetryStrategyTest extends TestCase { public function testNull(): void diff --git a/tests/Unit/Subscription/Store/ErrorContextTest.php b/tests/Unit/Subscription/Store/ErrorContextTest.php index 7bb9a391b..e757f28dd 100644 --- a/tests/Unit/Subscription/Store/ErrorContextTest.php +++ b/tests/Unit/Subscription/Store/ErrorContextTest.php @@ -5,10 +5,11 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Subscription\Store; use Patchlevel\EventSourcing\Subscription\ThrowableToErrorContextTransformer; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Subscription\ThrowableToErrorContextTransformer */ +#[CoversClass(ThrowableToErrorContextTransformer::class)] final class ErrorContextTest extends TestCase { public function testWithoutPrevious(): void diff --git a/tests/Unit/Subscription/Store/InMemorySubscriptionStoreTest.php b/tests/Unit/Subscription/Store/InMemorySubscriptionStoreTest.php index 9050bc3ef..274af10fa 100644 --- a/tests/Unit/Subscription/Store/InMemorySubscriptionStoreTest.php +++ b/tests/Unit/Subscription/Store/InMemorySubscriptionStoreTest.php @@ -12,9 +12,10 @@ use Patchlevel\EventSourcing\Subscription\Store\SubscriptionCriteria; use Patchlevel\EventSourcing\Subscription\Store\SubscriptionNotFound; use Patchlevel\EventSourcing\Subscription\Subscription; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Store\InMemorySubscriptionStore */ +#[CoversClass(InMemorySubscriptionStore::class)] final class InMemorySubscriptionStoreTest extends TestCase { public function testAdd(): void diff --git a/tests/Unit/Subscription/Store/SubscriptionAlreadyExistsTest.php b/tests/Unit/Subscription/Store/SubscriptionAlreadyExistsTest.php index dca218c24..bd60c528b 100644 --- a/tests/Unit/Subscription/Store/SubscriptionAlreadyExistsTest.php +++ b/tests/Unit/Subscription/Store/SubscriptionAlreadyExistsTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Subscription\Store; use Patchlevel\EventSourcing\Subscription\Store\SubscriptionAlreadyExists; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Store\SubscriptionAlreadyExists */ +#[CoversClass(SubscriptionAlreadyExists::class)] final class SubscriptionAlreadyExistsTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Subscription/Store/SubscriptionCriteriaTest.php b/tests/Unit/Subscription/Store/SubscriptionCriteriaTest.php index 29c4e04c0..48c3bc766 100644 --- a/tests/Unit/Subscription/Store/SubscriptionCriteriaTest.php +++ b/tests/Unit/Subscription/Store/SubscriptionCriteriaTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Subscription\Store; use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngineCriteria; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngineCriteria */ +#[CoversClass(SubscriptionEngineCriteria::class)] final class SubscriptionCriteriaTest extends TestCase { public function testSubscriptionId(): void diff --git a/tests/Unit/Subscription/Store/SubscriptionNotFoundTest.php b/tests/Unit/Subscription/Store/SubscriptionNotFoundTest.php index a4d456ccd..e93ed2d73 100644 --- a/tests/Unit/Subscription/Store/SubscriptionNotFoundTest.php +++ b/tests/Unit/Subscription/Store/SubscriptionNotFoundTest.php @@ -5,9 +5,10 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Subscription\Store; use Patchlevel\EventSourcing\Subscription\Store\SubscriptionNotFound; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Store\SubscriptionNotFound */ +#[CoversClass(SubscriptionNotFound::class)] final class SubscriptionNotFoundTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Subscription/Subscriber/ArgumentResolver/AggregateIdArgumentResolverTest.php b/tests/Unit/Subscription/Subscriber/ArgumentResolver/AggregateIdArgumentResolverTest.php index 10a39c6ba..4524e3a9a 100644 --- a/tests/Unit/Subscription/Subscriber/ArgumentResolver/AggregateIdArgumentResolverTest.php +++ b/tests/Unit/Subscription/Subscriber/ArgumentResolver/AggregateIdArgumentResolverTest.php @@ -14,9 +14,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\AggregateIdArgumentResolver */ +#[CoversClass(AggregateIdArgumentResolver::class)] final class AggregateIdArgumentResolverTest extends TestCase { public function testSupport(): void diff --git a/tests/Unit/Subscription/Subscriber/ArgumentResolver/EventArgumentResolverTest.php b/tests/Unit/Subscription/Subscriber/ArgumentResolver/EventArgumentResolverTest.php index 14bb807c4..1317b9302 100644 --- a/tests/Unit/Subscription/Subscriber/ArgumentResolver/EventArgumentResolverTest.php +++ b/tests/Unit/Subscription/Subscriber/ArgumentResolver/EventArgumentResolverTest.php @@ -10,9 +10,10 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\EventArgumentResolver */ +#[CoversClass(EventArgumentResolver::class)] final class EventArgumentResolverTest extends TestCase { public function testSupport(): void diff --git a/tests/Unit/Subscription/Subscriber/ArgumentResolver/LookupResolverTest.php b/tests/Unit/Subscription/Subscriber/ArgumentResolver/LookupResolverTest.php index dcb4366d1..7f253da9c 100644 --- a/tests/Unit/Subscription/Subscriber/ArgumentResolver/LookupResolverTest.php +++ b/tests/Unit/Subscription/Subscriber/ArgumentResolver/LookupResolverTest.php @@ -12,14 +12,16 @@ use Patchlevel\EventSourcing\Store\Header\IndexHeader; use Patchlevel\EventSourcing\Store\Store; use Patchlevel\EventSourcing\Subscription\Lookup\Lookup; +use Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\AggregateIdArgumentResolver; use Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\LookupResolver; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\AggregateIdArgumentResolver */ +#[CoversClass(AggregateIdArgumentResolver::class)] final class LookupResolverTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Subscription/Subscriber/ArgumentResolver/MessageArgumentResolverTest.php b/tests/Unit/Subscription/Subscriber/ArgumentResolver/MessageArgumentResolverTest.php index 6dc808a5c..eee886166 100644 --- a/tests/Unit/Subscription/Subscriber/ArgumentResolver/MessageArgumentResolverTest.php +++ b/tests/Unit/Subscription/Subscriber/ArgumentResolver/MessageArgumentResolverTest.php @@ -7,10 +7,11 @@ use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Metadata\Subscriber\ArgumentMetadata; use Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\MessageArgumentResolver; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use stdClass; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\MessageArgumentResolver */ +#[CoversClass(MessageArgumentResolver::class)] final class MessageArgumentResolverTest extends TestCase { public function testSupport(): void diff --git a/tests/Unit/Subscription/Subscriber/ArgumentResolver/RecordedOnArgumentResolverTest.php b/tests/Unit/Subscription/Subscriber/ArgumentResolver/RecordedOnArgumentResolverTest.php index 6a4480166..7e284a0a4 100644 --- a/tests/Unit/Subscription/Subscriber/ArgumentResolver/RecordedOnArgumentResolverTest.php +++ b/tests/Unit/Subscription/Subscriber/ArgumentResolver/RecordedOnArgumentResolverTest.php @@ -9,10 +9,11 @@ use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Metadata\Subscriber\ArgumentMetadata; use Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\RecordedOnArgumentResolver; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use stdClass; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscriber\ArgumentResolver\RecordedOnArgumentResolver */ +#[CoversClass(RecordedOnArgumentResolver::class)] final class RecordedOnArgumentResolverTest extends TestCase { public function testSupport(): void diff --git a/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorRepositoryTest.php b/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorRepositoryTest.php index c66f37a6c..fce3984d6 100644 --- a/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorRepositoryTest.php +++ b/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorRepositoryTest.php @@ -14,9 +14,10 @@ use Patchlevel\EventSourcing\Subscription\Subscriber\DuplicateSubscriberId; use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessor; use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessorRepository; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessorRepository */ +#[CoversClass(MetadataSubscriberAccessorRepository::class)] final class MetadataSubscriberAccessorRepositoryTest extends TestCase { public function testEmpty(): void diff --git a/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php b/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php index d66d9fa90..19f84f993 100644 --- a/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php +++ b/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php @@ -17,9 +17,10 @@ use Patchlevel\EventSourcing\Subscription\Subscriber\NoSuitableResolver; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessor */ +#[CoversClass(MetadataSubscriberAccessor::class)] final class MetadataSubscriberAccessorTest extends TestCase { public function testId(): void diff --git a/tests/Unit/Subscription/Subscriber/SubscriberHelperTest.php b/tests/Unit/Subscription/Subscriber/SubscriberHelperTest.php index 900156c7f..8220e0786 100644 --- a/tests/Unit/Subscription/Subscriber/SubscriberHelperTest.php +++ b/tests/Unit/Subscription/Subscriber/SubscriberHelperTest.php @@ -7,9 +7,10 @@ use Patchlevel\EventSourcing\Attribute\Subscriber; use Patchlevel\EventSourcing\Subscription\RunMode; use Patchlevel\EventSourcing\Subscription\Subscriber\SubscriberHelper; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscriber\SubscriberHelper */ +#[CoversClass(SubscriberHelper::class)] final class SubscriberHelperTest extends TestCase { public function testSubscriberId(): void diff --git a/tests/Unit/Subscription/SubscriptionErrorTest.php b/tests/Unit/Subscription/SubscriptionErrorTest.php index 4cc5195f3..58f17baaa 100644 --- a/tests/Unit/Subscription/SubscriptionErrorTest.php +++ b/tests/Unit/Subscription/SubscriptionErrorTest.php @@ -6,10 +6,11 @@ use Patchlevel\EventSourcing\Subscription\Status; use Patchlevel\EventSourcing\Subscription\SubscriptionError; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Subscription\SubscriptionError */ +#[CoversClass(SubscriptionError::class)] final class SubscriptionErrorTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Subscription/SubscriptionTest.php b/tests/Unit/Subscription/SubscriptionTest.php index f1b5aea78..39f6611f9 100644 --- a/tests/Unit/Subscription/SubscriptionTest.php +++ b/tests/Unit/Subscription/SubscriptionTest.php @@ -10,10 +10,11 @@ use Patchlevel\EventSourcing\Subscription\Subscription; use Patchlevel\EventSourcing\Subscription\SubscriptionError; use Patchlevel\EventSourcing\Subscription\ThrowableToErrorContextTransformer; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Subscription\Subscription */ +#[CoversClass(Subscription::class)] final class SubscriptionTest extends TestCase { public function testCreate(): void diff --git a/tests/Unit/Test/IncrementalRamseyUuidFactoryTest.php b/tests/Unit/Test/IncrementalRamseyUuidFactoryTest.php index d2736e089..628f47d2f 100644 --- a/tests/Unit/Test/IncrementalRamseyUuidFactoryTest.php +++ b/tests/Unit/Test/IncrementalRamseyUuidFactoryTest.php @@ -6,10 +6,11 @@ use Patchlevel\EventSourcing\Aggregate\Uuid; use Patchlevel\EventSourcing\Test\IncrementalRamseyUuidFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Ramsey\Uuid\Uuid as RamseyUuid; -/** @covers \Patchlevel\EventSourcing\Test\IncrementalRamseyUuidFactory */ +#[CoversClass(IncrementalRamseyUuidFactory::class)] final class IncrementalRamseyUuidFactoryTest extends TestCase { public function testGenerate(): void From 9fb4e0a6ff6c536ab965080d98dc1c9ffe978f95 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Thu, 3 Apr 2025 15:54:22 +0200 Subject: [PATCH 2/4] Update tests/Unit/Serializer/Upcast/UpcastTest.php Co-authored-by: David Badura --- tests/Unit/Serializer/Upcast/UpcastTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Unit/Serializer/Upcast/UpcastTest.php b/tests/Unit/Serializer/Upcast/UpcastTest.php index 17fceff1a..1e28c62b4 100644 --- a/tests/Unit/Serializer/Upcast/UpcastTest.php +++ b/tests/Unit/Serializer/Upcast/UpcastTest.php @@ -8,7 +8,7 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -#[CoversClass(Patchlevel\EventSourcing\Serializer\Upcast\Upcast::class)] +#[CoversClass(Upcast::class)] final class UpcastTest extends TestCase { public function testReplaceEventName(): void From a44817688bebc6581fad794f9d9fd0a884b7457f Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Thu, 3 Apr 2025 14:09:35 +0000 Subject: [PATCH 3/4] one last cover class missing --- tests/Unit/Serializer/Normalizer/IdNormalizerTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Unit/Serializer/Normalizer/IdNormalizerTest.php b/tests/Unit/Serializer/Normalizer/IdNormalizerTest.php index ef8b1adb6..676546ef1 100644 --- a/tests/Unit/Serializer/Normalizer/IdNormalizerTest.php +++ b/tests/Unit/Serializer/Normalizer/IdNormalizerTest.php @@ -12,6 +12,7 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use Patchlevel\Hydrator\Normalizer\InvalidArgument; use Patchlevel\Hydrator\Normalizer\InvalidType; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use Ramsey\Uuid\Exception\InvalidUuidStringException; @@ -19,7 +20,7 @@ use ReflectionType; use RuntimeException; -/** @covers \Patchlevel\EventSourcing\Serializer\Normalizer\IdNormalizer */ +#[CoversClass(IdNormalizer::class)] #[Attribute(Attribute::TARGET_PROPERTY)] final class IdNormalizerTest extends TestCase { From 88457a7fc77a80208d4c757da3b616d8b3106e3d Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Thu, 3 Apr 2025 14:14:01 +0000 Subject: [PATCH 4/4] update Psalm baseline config file (on @DanielBadura recommendation) --- baseline.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/baseline.xml b/baseline.xml index a0402ca68..81daef60e 100644 --- a/baseline.xml +++ b/baseline.xml @@ -366,6 +366,7 @@ + reveal())]]> reveal())]]> @@ -512,10 +513,16 @@ + + + + + +