From ea3f740c9993cc13eed32db65615947add72e686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gildas=20Qu=C3=A9m=C3=A9ner?= Date: Thu, 7 Jan 2021 18:47:07 +0100 Subject: [PATCH] Attempts to add php 8 support --- .gitignore | 1 + .travis.yml | 6 +++ composer.json | 13 +++-- phpunit.xml.dist | 47 ++++++++++--------- tests/AbstractEventStoreTest.php | 2 + tests/ActionEventEmitterEventStoreTest.php | 2 + .../InMemoryEventStoreFactoryTest.php | 34 +++++++++----- .../InMemoryProjectionManagerFactoryTest.php | 3 ++ tests/Example/QuickStartTest.php | 2 +- .../MetadataEnricherAggregateTest.php | 3 ++ tests/Metadata/MetadataEnricherPluginTest.php | 3 ++ tests/Plugin/PluginManagerTest.php | 3 ++ .../AbstractEventStoreProjectorTest.php | 4 +- .../AbstractEventStoreQueryTest.php | 4 +- ...stractEventStoreReadModelProjectorTest.php | 4 +- .../InMemoryEventStoreProjectorTest.php | 3 ++ .../InMemoryEventStoreQueryTest.php | 3 ++ ...MemoryEventStoreReadModelProjectorTest.php | 3 ++ .../InMemoryProjectionManagerTest.php | 5 +- tests/ReadOnlyEventStoreWrapperTest.php | 3 ++ ...tionalActionEventEmitterEventStoreTest.php | 2 + tests/TransactionalEventStoreTestTrait.php | 3 ++ tests/Upcasting/NoOpEventUpcasterTest.php | 5 +- tests/Upcasting/SingleEventUpcasterTest.php | 7 ++- tests/Upcasting/UpcasterChainTest.php | 5 +- tests/Upcasting/UpcastingIteratorTest.php | 3 ++ 26 files changed, 119 insertions(+), 54 deletions(-) diff --git a/.gitignore b/.gitignore index 53e3121e..1bd98eef 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /build .idea .php_cs.cache +.phpunit.result.cache nbproject composer.lock docs/html diff --git a/.travis.yml b/.travis.yml index 6590bf8e..0cfc7bbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,12 @@ matrix: - php: 7.4 env: - DEPENDENCIES="--prefer-lowest --prefer-stable" + - php: 8.0 + env: + - DEPENDENCIES="" + - php: 8.0 + env: + - DEPENDENCIES="--prefer-lowest --prefer-stable" cache: directories: diff --git a/composer.json b/composer.json index 64a3968b..4d43327f 100644 --- a/composer.json +++ b/composer.json @@ -24,19 +24,18 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^7.1", + "php": "^7.1 | ^8.0", "marc-mabe/php-enum": "^2.3.1 || ^3.0.0 || ^4.0.0", "prooph/common": "^4.1.0" }, "require-dev": { - "phpspec/prophecy": "^1.10.3", - "phpunit/php-invoker": "^2.0", - "phpunit/phpunit": "^7.5.20", - "prooph/bookdown-template": "^0.2.3", - "prooph/php-cs-fixer-config": "v0.3.1", + "phpspec/prophecy-phpunit": "^2.0.0", "psr/container": "^1.0", "sandrokeil/interop-config": "^2.0.1", - "satooshi/php-coveralls": "^1.0" + "phpunit/phpunit": "^9.0", + "prooph/php-cs-fixer-config": "^0.4", + "satooshi/php-coveralls": "^1.0", + "prooph/bookdown-template": "^0.2.3" }, "suggest" : { "prooph/pdo-event-store": "For usage with MySQL or Postgres as event store", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ebb0526b..3d494364 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,26 +1,27 @@ - - - - ./tests - - - - - ./src/ - - + + + ./src/ + + + + ./tests + diff --git a/tests/AbstractEventStoreTest.php b/tests/AbstractEventStoreTest.php index 7cc712c0..1e00d624 100644 --- a/tests/AbstractEventStoreTest.php +++ b/tests/AbstractEventStoreTest.php @@ -28,6 +28,7 @@ use ProophTest\EventStore\Mock\TestDomainEvent; use ProophTest\EventStore\Mock\UserCreated; use ProophTest\EventStore\Mock\UsernameChanged; +use Prophecy\PhpUnit\ProphecyTrait; /** * Common tests for all event store implementations @@ -35,6 +36,7 @@ abstract class AbstractEventStoreTest extends TestCase { use EventStoreTestStreamTrait; + use ProphecyTrait; /** * @var EventStore diff --git a/tests/ActionEventEmitterEventStoreTest.php b/tests/ActionEventEmitterEventStoreTest.php index 42e90071..7121b1a5 100644 --- a/tests/ActionEventEmitterEventStoreTest.php +++ b/tests/ActionEventEmitterEventStoreTest.php @@ -25,9 +25,11 @@ use Prooph\EventStore\Metadata\Operator; use Prooph\EventStore\StreamName; use ProophTest\EventStore\Mock\UsernameChanged; +use Prophecy\PhpUnit\ProphecyTrait; class ActionEventEmitterEventStoreTest extends ActionEventEmitterEventStoreTestCase { + use ProphecyTrait; use EventStoreTestStreamTrait; /** diff --git a/tests/Container/InMemoryEventStoreFactoryTest.php b/tests/Container/InMemoryEventStoreFactoryTest.php index e3652d81..4948a89a 100644 --- a/tests/Container/InMemoryEventStoreFactoryTest.php +++ b/tests/Container/InMemoryEventStoreFactoryTest.php @@ -32,9 +32,12 @@ use ProophTest\EventStore\Mock\UsernameChanged; use Prophecy\Argument; use Psr\Container\ContainerInterface; +use Prophecy\PhpUnit\ProphecyTrait; class InMemoryEventStoreFactoryTest extends TestCase { + use ProphecyTrait; + /** * @test */ @@ -43,7 +46,7 @@ public function it_creates_event_store_with_default_event_emitter(): void $config['prooph']['event_store']['default'] = []; $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); + $containerMock->expects($this->once())->method('get')->with('config')->willReturn($config); $factory = new InMemoryEventStoreFactory(); $eventStore = $factory($containerMock); @@ -59,7 +62,7 @@ public function it_creates_event_store_without_event_emitter(): void $config['prooph']['event_store']['default'] = ['wrap_action_event_emitter' => false]; $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); + $containerMock->expects($this->once())->method('get')->with('config')->willReturn($config); $factory = new InMemoryEventStoreFactory(); $eventStore = $factory($containerMock); @@ -75,7 +78,7 @@ public function it_creates_non_transactional_event_store_without_event_emitter() $config['prooph']['event_store']['default'] = ['wrap_action_event_emitter' => false, 'transactional' => false]; $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); + $containerMock->expects($this->once())->method('get')->with('config')->willReturn($config); $factory = new InMemoryEventStoreFactory(); $eventStore = $factory($containerMock); @@ -91,7 +94,7 @@ public function it_creates_read_only_event_store(): void $config['prooph']['event_store']['default'] = ['wrap_action_event_emitter' => false, 'read_only' => true]; $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); + $containerMock->expects($this->once())->method('get')->with('config')->willReturn($config); $factory = new InMemoryEventStoreFactory(); $eventStore = $factory($containerMock); @@ -107,7 +110,7 @@ public function it_creates_event_store_with_default_event_emitter_via_callstatic $config['prooph']['event_store']['another'] = []; $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); + $containerMock->expects($this->once())->method('get')->with('config')->willReturn($config); $type = 'another'; $eventStore = InMemoryEventStoreFactory::$type($containerMock); @@ -123,7 +126,7 @@ public function it_creates_non_transactional_event_store_with_non_transactional_ $config['prooph']['event_store']['another'] = ['transactional' => false]; $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); + $containerMock->expects($this->once())->method('get')->with('config')->willReturn($config); $type = 'another'; $eventStore = InMemoryEventStoreFactory::$type($containerMock); @@ -141,8 +144,10 @@ public function it_injects_custom_event_emitter(): void $eventEmitterMock = $this->getMockForAbstractClass(ActionEventEmitter::class); $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); - $containerMock->expects($this->at(1))->method('get')->with('event_emitter')->willReturn($eventEmitterMock); + $containerMock->expects($this->any())->method('get')->willReturnMap([ + ['config', $config], + ['event_emitter', $eventEmitterMock] + ]); $factory = new InMemoryEventStoreFactory(); $eventStore = $factory($containerMock); @@ -152,6 +157,7 @@ public function it_injects_custom_event_emitter(): void /** * @test + * @group only */ public function it_injects_plugins(): void { @@ -161,8 +167,10 @@ public function it_injects_plugins(): void $featureMock->attachToEventStore(Argument::type(TransactionalActionEventEmitterEventStore::class))->shouldBeCalled(); $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); - $containerMock->expects($this->at(1))->method('get')->with('plugin')->willReturn($featureMock->reveal()); + $containerMock->expects($this->any())->method('get')->willReturnMap([ + ['config', $config], + ['plugin', $featureMock->reveal()] + ]); $factory = new InMemoryEventStoreFactory(); $eventStore = $factory($containerMock); @@ -183,8 +191,10 @@ public function it_throws_exception_when_invalid_plugin_configured(): void $featureMock = 'foo'; $containerMock = $this->getMockForAbstractClass(ContainerInterface::class); - $containerMock->expects($this->at(0))->method('get')->with('config')->willReturn($config); - $containerMock->expects($this->at(1))->method('get')->with('plugin')->willReturn($featureMock); + $containerMock->expects($this->any())->method('get')->willReturnMap([ + ['config', $config], + ['plugin', $featureMock] + ]); $factory = new InMemoryEventStoreFactory(); $factory($containerMock); diff --git a/tests/Container/InMemoryProjectionManagerFactoryTest.php b/tests/Container/InMemoryProjectionManagerFactoryTest.php index ce7b5e2f..7293fd33 100644 --- a/tests/Container/InMemoryProjectionManagerFactoryTest.php +++ b/tests/Container/InMemoryProjectionManagerFactoryTest.php @@ -19,9 +19,12 @@ use Prooph\EventStore\InMemoryEventStore; use Prooph\EventStore\Projection\InMemoryProjectionManager; use Psr\Container\ContainerInterface; +use Prophecy\PhpUnit\ProphecyTrait; class InMemoryProjectionManagerFactoryTest extends TestCase { + use ProphecyTrait; + /** * @test */ diff --git a/tests/Example/QuickStartTest.php b/tests/Example/QuickStartTest.php index 6127ca44..5f355dea 100644 --- a/tests/Example/QuickStartTest.php +++ b/tests/Example/QuickStartTest.php @@ -27,7 +27,7 @@ public function it_provides_the_correct_example_output(): void '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}' ); - $this->assertRegExp($pattern, $this->getQuickstartOutput()); + $this->assertMatchesRegularExpression($pattern, $this->getQuickstartOutput()); } private function getQuickstartOutput(): string diff --git a/tests/Metadata/MetadataEnricherAggregateTest.php b/tests/Metadata/MetadataEnricherAggregateTest.php index 207b9df2..10b3da43 100644 --- a/tests/Metadata/MetadataEnricherAggregateTest.php +++ b/tests/Metadata/MetadataEnricherAggregateTest.php @@ -20,9 +20,12 @@ use Prooph\EventStore\Metadata\MetadataEnricherAggregate; use ProophTest\EventStore\Mock\TestDomainEvent; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; class MetadataEnricherAggregateTest extends TestCase { + use ProphecyTrait; + /** * @test */ diff --git a/tests/Metadata/MetadataEnricherPluginTest.php b/tests/Metadata/MetadataEnricherPluginTest.php index 5d872d36..e4c9f5cb 100644 --- a/tests/Metadata/MetadataEnricherPluginTest.php +++ b/tests/Metadata/MetadataEnricherPluginTest.php @@ -25,9 +25,12 @@ use Prooph\EventStore\StreamName; use ProophTest\EventStore\Mock\TestDomainEvent; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; class MetadataEnricherPluginTest extends TestCase { + use ProphecyTrait; + /** * @test */ diff --git a/tests/Plugin/PluginManagerTest.php b/tests/Plugin/PluginManagerTest.php index eb990c6b..95c775e4 100644 --- a/tests/Plugin/PluginManagerTest.php +++ b/tests/Plugin/PluginManagerTest.php @@ -19,9 +19,12 @@ use ProophTest\EventStore\Mock\EventLoggerPlugin; use ProophTest\EventStore\Mock\UserCreated; use Psr\Container\ContainerInterface; +use Prophecy\PhpUnit\ProphecyTrait; class PluginManagerTest extends ActionEventEmitterEventStoreTestCase { + use ProphecyTrait; + /** * @test */ diff --git a/tests/Projection/AbstractEventStoreProjectorTest.php b/tests/Projection/AbstractEventStoreProjectorTest.php index 59887c18..d05f4a25 100644 --- a/tests/Projection/AbstractEventStoreProjectorTest.php +++ b/tests/Projection/AbstractEventStoreProjectorTest.php @@ -777,13 +777,13 @@ public function it_resets_to_empty_array(): void $state = $projection->getState(); - $this->assertInternalType('array', $state); + $this->assertIsArray($state); $projection->reset(); $state2 = $projection->getState(); - $this->assertInternalType('array', $state2); + $this->assertIsArray($state2); } /** diff --git a/tests/Projection/AbstractEventStoreQueryTest.php b/tests/Projection/AbstractEventStoreQueryTest.php index 8893900d..40448df1 100644 --- a/tests/Projection/AbstractEventStoreQueryTest.php +++ b/tests/Projection/AbstractEventStoreQueryTest.php @@ -300,13 +300,13 @@ public function it_resets_to_empty_array(): void $state = $query->getState(); - $this->assertInternalType('array', $state); + $this->assertIsArray($state); $query->reset(); $state2 = $query->getState(); - $this->assertInternalType('array', $state2); + $this->assertIsArray($state2); } /** diff --git a/tests/Projection/AbstractEventStoreReadModelProjectorTest.php b/tests/Projection/AbstractEventStoreReadModelProjectorTest.php index d8a7a743..d5a9fa34 100644 --- a/tests/Projection/AbstractEventStoreReadModelProjectorTest.php +++ b/tests/Projection/AbstractEventStoreReadModelProjectorTest.php @@ -418,13 +418,13 @@ public function it_resets_to_empty_array(): void $state = $projection->getState(); - $this->assertInternalType('array', $state); + $this->assertIsArray($state); $projection->reset(); $state2 = $projection->getState(); - $this->assertInternalType('array', $state2); + $this->assertIsArray($state2); } /** diff --git a/tests/Projection/InMemoryEventStoreProjectorTest.php b/tests/Projection/InMemoryEventStoreProjectorTest.php index 034de242..32cdaae9 100644 --- a/tests/Projection/InMemoryEventStoreProjectorTest.php +++ b/tests/Projection/InMemoryEventStoreProjectorTest.php @@ -20,9 +20,12 @@ use Prooph\EventStore\NonTransactionalInMemoryEventStore; use Prooph\EventStore\Projection\InMemoryEventStoreProjector; use Prooph\EventStore\Projection\InMemoryProjectionManager; +use Prophecy\PhpUnit\ProphecyTrait; class InMemoryEventStoreProjectorTest extends AbstractEventStoreProjectorTest { + use ProphecyTrait; + /** * @var InMemoryProjectionManager */ diff --git a/tests/Projection/InMemoryEventStoreQueryTest.php b/tests/Projection/InMemoryEventStoreQueryTest.php index 516c6b40..6f773002 100644 --- a/tests/Projection/InMemoryEventStoreQueryTest.php +++ b/tests/Projection/InMemoryEventStoreQueryTest.php @@ -20,9 +20,12 @@ use Prooph\EventStore\NonTransactionalInMemoryEventStore; use Prooph\EventStore\Projection\InMemoryEventStoreQuery; use Prooph\EventStore\Projection\InMemoryProjectionManager; +use Prophecy\PhpUnit\ProphecyTrait; class InMemoryEventStoreQueryTest extends AbstractEventStoreQueryTest { + use ProphecyTrait; + /** * @var InMemoryProjectionManager */ diff --git a/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php b/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php index 9b1da04f..012acf9b 100644 --- a/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php +++ b/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php @@ -21,9 +21,12 @@ use Prooph\EventStore\Projection\InMemoryEventStoreReadModelProjector; use Prooph\EventStore\Projection\InMemoryProjectionManager; use ProophTest\EventStore\Mock\ReadModelMock; +use Prophecy\PhpUnit\ProphecyTrait; class InMemoryEventStoreReadModelProjectorTest extends AbstractEventStoreReadModelProjectorTest { + use ProphecyTrait; + /** * @var InMemoryProjectionManager */ diff --git a/tests/Projection/InMemoryProjectionManagerTest.php b/tests/Projection/InMemoryProjectionManagerTest.php index 7a40659d..cc750075 100644 --- a/tests/Projection/InMemoryProjectionManagerTest.php +++ b/tests/Projection/InMemoryProjectionManagerTest.php @@ -20,15 +20,18 @@ use Prooph\EventStore\InMemoryEventStore; use Prooph\EventStore\NonTransactionalInMemoryEventStore; use Prooph\EventStore\Projection\InMemoryProjectionManager; +use Prophecy\PhpUnit\ProphecyTrait; class InMemoryProjectionManagerTest extends AbstractProjectionManagerTest { + use ProphecyTrait; + /** * @var InMemoryProjectionManager */ protected $projectionManager; - protected function setUp() + protected function setUp(): void { $this->projectionManager = new InMemoryProjectionManager(new InMemoryEventStore()); } diff --git a/tests/ReadOnlyEventStoreWrapperTest.php b/tests/ReadOnlyEventStoreWrapperTest.php index 0b4762eb..8ee9f119 100644 --- a/tests/ReadOnlyEventStoreWrapperTest.php +++ b/tests/ReadOnlyEventStoreWrapperTest.php @@ -18,9 +18,12 @@ use Prooph\EventStore\ReadOnlyEventStoreWrapper; use Prooph\EventStore\StreamName; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; class ReadOnlyEventStoreWrapperTest extends TestCase { + use ProphecyTrait; + /** * @test */ diff --git a/tests/TransactionalActionEventEmitterEventStoreTest.php b/tests/TransactionalActionEventEmitterEventStoreTest.php index bec12de0..a1f813f6 100644 --- a/tests/TransactionalActionEventEmitterEventStoreTest.php +++ b/tests/TransactionalActionEventEmitterEventStoreTest.php @@ -21,10 +21,12 @@ use Prooph\EventStore\Stream; use Prooph\EventStore\StreamName; use Prooph\EventStore\TransactionalActionEventEmitterEventStore; +use Prophecy\PhpUnit\ProphecyTrait; class TransactionalActionEventEmitterEventStoreTest extends TestCase { use EventStoreTestStreamTrait; + use ProphecyTrait; /** * @var TransactionalActionEventEmitterEventStore diff --git a/tests/TransactionalEventStoreTestTrait.php b/tests/TransactionalEventStoreTestTrait.php index b7dbe6f8..dc3011ef 100644 --- a/tests/TransactionalEventStoreTestTrait.php +++ b/tests/TransactionalEventStoreTestTrait.php @@ -22,12 +22,15 @@ use Prooph\EventStore\StreamName; use Prooph\EventStore\TransactionalEventStore; use ProophTest\EventStore\Mock\UsernameChanged; +use Prophecy\PhpUnit\ProphecyTrait; /** * Common tests for all transactional event store implementations */ trait TransactionalEventStoreTestTrait { + use ProphecyTrait; + /** * @var TransactionalEventStore */ diff --git a/tests/Upcasting/NoOpEventUpcasterTest.php b/tests/Upcasting/NoOpEventUpcasterTest.php index 91a7b8c2..e9b48773 100644 --- a/tests/Upcasting/NoOpEventUpcasterTest.php +++ b/tests/Upcasting/NoOpEventUpcasterTest.php @@ -16,9 +16,12 @@ use PHPUnit\Framework\TestCase; use Prooph\Common\Messaging\Message; use Prooph\EventStore\Upcasting\NoOpEventUpcaster; +use Prophecy\PhpUnit\ProphecyTrait; class NoOpEventUpcasterTest extends TestCase { + use ProphecyTrait; + /** * @test */ @@ -30,7 +33,7 @@ public function it_does_nothing_during_upcast(): void $upcaster = new NoOpEventUpcaster(); $messages = $upcaster->upcast($message); - $this->assertInternalType('array', $messages); + $this->assertIsArray($messages); $this->assertNotEmpty($messages); $this->assertSame($message, $messages[0]); } diff --git a/tests/Upcasting/SingleEventUpcasterTest.php b/tests/Upcasting/SingleEventUpcasterTest.php index 6e9931d2..f60229a1 100644 --- a/tests/Upcasting/SingleEventUpcasterTest.php +++ b/tests/Upcasting/SingleEventUpcasterTest.php @@ -16,9 +16,12 @@ use PHPUnit\Framework\TestCase; use Prooph\Common\Messaging\Message; use Prooph\EventStore\Upcasting\SingleEventUpcaster; +use Prophecy\PhpUnit\ProphecyTrait; class SingleEventUpcasterTest extends TestCase { + use ProphecyTrait; + /** * @test */ @@ -35,7 +38,7 @@ public function it_upcasts(): void $messages = $upcaster->upcast($message); - $this->assertInternalType('array', $messages); + $this->assertIsArray($messages); $this->assertNotEmpty($messages); $this->assertSame($upcastedMessage, $messages[0]); } @@ -53,7 +56,7 @@ public function it_does_not_upcast_when_impossible(): void $messages = $upcaster->upcast($message); - $this->assertInternalType('array', $messages); + $this->assertIsArray($messages); $this->assertNotEmpty($messages); $this->assertSame($message, $messages[0]); } diff --git a/tests/Upcasting/UpcasterChainTest.php b/tests/Upcasting/UpcasterChainTest.php index 3b4008f9..4e169c24 100644 --- a/tests/Upcasting/UpcasterChainTest.php +++ b/tests/Upcasting/UpcasterChainTest.php @@ -19,9 +19,12 @@ use Prooph\EventStore\Upcasting\SingleEventUpcaster; use Prooph\EventStore\Upcasting\Upcaster; use Prooph\EventStore\Upcasting\UpcasterChain; +use Prophecy\PhpUnit\ProphecyTrait; class UpcasterChainTest extends TestCase { + use ProphecyTrait; + /** * @test */ @@ -50,7 +53,7 @@ public function it_chains_upcasts(): void $messages = $upcasterChain->upcast($message); - $this->assertInternalType('array', $messages); + $this->assertIsArray($messages); $this->assertNotEmpty($messages); $this->assertSame($upcastedMessage2, $messages[0]); $this->assertSame($upcastedMessage3, $messages[1]); diff --git a/tests/Upcasting/UpcastingIteratorTest.php b/tests/Upcasting/UpcastingIteratorTest.php index 493f4f63..a21e3fbf 100644 --- a/tests/Upcasting/UpcastingIteratorTest.php +++ b/tests/Upcasting/UpcastingIteratorTest.php @@ -20,9 +20,12 @@ use Prooph\EventStore\StreamIterator\StreamIterator; use Prooph\EventStore\Upcasting\SingleEventUpcaster; use Prooph\EventStore\Upcasting\UpcastingIterator; +use Prophecy\PhpUnit\ProphecyTrait; class UpcastingIteratorTest extends TestCase { + use ProphecyTrait; + /** * @test */