diff --git a/.gitignore b/.gitignore index 53e3121e..29010a6c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ nbproject composer.lock docs/html +.phpunit.result.cache diff --git a/.travis.yml b/.travis.yml index 6590bf8e..751276a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,20 +3,15 @@ language: php matrix: fast_finish: true include: - - php: 7.1 + - php: 7.3 env: - DEPENDENCIES="" - - EXECUTE_CS_CHECK=true + - XDEBUG_MODE="coverage" - TEST_COVERAGE=true - - php: 7.1 - env: - - DEPENDENCIES="--prefer-lowest --prefer-stable" - - php: 7.2 + - php: 7.3 env: - DEPENDENCIES="" - - php: 7.2 - env: - - DEPENDENCIES="--prefer-lowest --prefer-stable" + - PHP_CS=true - php: 7.3 env: - DEPENDENCIES="" @@ -29,6 +24,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: @@ -41,10 +42,10 @@ before_script: - phpenv config-rm xdebug.ini - composer self-update - composer update --prefer-dist $DEPENDENCIES + - rm -rf $HOME/.php-cs-fixer/.php_cs.cache script: - - if [[ $TEST_COVERAGE == 'true' ]]; then php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi - - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; elif [[ $PHP_CS == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; else ./vendor/bin/phpunit; fi after_success: - if [[ $TEST_COVERAGE == 'true' ]]; then php vendor/bin/coveralls -v; fi diff --git a/README.md b/README.md index d182d75e..da950e20 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ PHP 7.1 EventStore Implementation. -[![Build Status](https://travis-ci.org/prooph/event-store.svg?branch=master)](https://travis-ci.org/prooph/event-store) -[![Coverage Status](https://coveralls.io/repos/prooph/event-store/badge.svg?branch=master&service=github)](https://coveralls.io/github/prooph/event-store?branch=master) +[![Build Status](https://travis-ci.com/prooph/event-store.svg?branch=7.x)](https://travis-ci.com/prooph/event-store) +[![Coverage Status](https://coveralls.io/repos/prooph/event-store/badge.svg?branch=7.x&service=github)](https://coveralls.io/github/prooph/event-store?branch=7.x) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/prooph/improoph) ## Overview @@ -57,11 +57,12 @@ To establish a consistent code quality, please provide unit tests for all your c ## Version Guidance -| Version | Status | PHP Version | Support Until | -|---------|------------|-------------|---------------| -| 5.x | EOL | >= 5.5 | EOL | -| 6.x | Maintained | >= 5.5 | 3 Dec 2017 | -| 7.x | Latest | >= 7.1 | active | +| Version | Status | PHP Version | Support Until | +|---------|------------|---------------|---------------| +| 5.x | EOL | \>= 5.5 | EOL | +| 6.x | Maintained | \>= 5.5 | 3 Dec 2017 | +| 7.5.x | Latest | \>= 7. | active | +| 7.6 | Latest | \>= 7.3 \| 8.0 | active | ## License diff --git a/composer.json b/composer.json index 64a3968b..6378af98 100644 --- a/composer.json +++ b/composer.json @@ -24,16 +24,17 @@ "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" + "prooph/common": "^4.5.0" }, "require-dev": { "phpspec/prophecy": "^1.10.3", - "phpunit/php-invoker": "^2.0", - "phpunit/phpunit": "^7.5.20", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/php-invoker": "^3.1", + "phpunit/phpunit": "^9.3", "prooph/bookdown-template": "^0.2.3", - "prooph/php-cs-fixer-config": "v0.3.1", + "prooph/php-cs-fixer-config": "^0.4", "psr/container": "^1.0", "sandrokeil/interop-config": "^2.0.1", "satooshi/php-coveralls": "^1.0" diff --git a/examples/event/QuickStartSucceeded.php b/examples/event/QuickStartSucceeded.php index f66ea01f..49c5a2ba 100644 --- a/examples/event/QuickStartSucceeded.php +++ b/examples/event/QuickStartSucceeded.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/quickstart.php b/examples/quickstart.php index 03b273ac..cb77c74c 100644 --- a/examples/quickstart.php +++ b/examples/quickstart.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ebb0526b..5b942915 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -13,14 +13,15 @@ enforceTimeLimit="true" failOnWarning="true" failOnRisky="true" + timeoutForLargeTests="180" > ./tests - - - ./src/ - - + + + src + + diff --git a/src/ActionEventEmitterEventStore.php b/src/ActionEventEmitterEventStore.php index 50cd352c..2e0922f7 100644 --- a/src/ActionEventEmitterEventStore.php +++ b/src/ActionEventEmitterEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Container/InMemoryEventStoreFactory.php b/src/Container/InMemoryEventStoreFactory.php index 79f0783c..11d6cc00 100644 --- a/src/Container/InMemoryEventStoreFactory.php +++ b/src/Container/InMemoryEventStoreFactory.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Container/InMemoryProjectionManagerFactory.php b/src/Container/InMemoryProjectionManagerFactory.php index 9502cbf5..9a6a0c2b 100644 --- a/src/Container/InMemoryProjectionManagerFactory.php +++ b/src/Container/InMemoryProjectionManagerFactory.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventStore.php b/src/EventStore.php index 33e843cf..a17dd65f 100644 --- a/src/EventStore.php +++ b/src/EventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventStoreDecorator.php b/src/EventStoreDecorator.php index db62b63e..36dd6b6b 100644 --- a/src/EventStoreDecorator.php +++ b/src/EventStoreDecorator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ConcurrencyException.php b/src/Exception/ConcurrencyException.php index 069f1583..66dc8da5 100644 --- a/src/Exception/ConcurrencyException.php +++ b/src/Exception/ConcurrencyException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ConfigurationException.php b/src/Exception/ConfigurationException.php index 812521ee..92364131 100644 --- a/src/Exception/ConfigurationException.php +++ b/src/Exception/ConfigurationException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/EventStoreException.php b/src/Exception/EventStoreException.php index 5f20d4fe..dc271257 100644 --- a/src/Exception/EventStoreException.php +++ b/src/Exception/EventStoreException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ExtensionNotLoadedException.php b/src/Exception/ExtensionNotLoadedException.php index 060ced53..641f3759 100644 --- a/src/Exception/ExtensionNotLoadedException.php +++ b/src/Exception/ExtensionNotLoadedException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 23e68d2f..2e5f4d7a 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/OutOfRangeException.php b/src/Exception/OutOfRangeException.php index 526c96e5..a0f11f64 100644 --- a/src/Exception/OutOfRangeException.php +++ b/src/Exception/OutOfRangeException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ProjectionNotFound.php b/src/Exception/ProjectionNotFound.php index 47a008eb..6b815e88 100644 --- a/src/Exception/ProjectionNotFound.php +++ b/src/Exception/ProjectionNotFound.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/RuntimeException.php b/src/Exception/RuntimeException.php index f79fbbb1..d690afae 100644 --- a/src/Exception/RuntimeException.php +++ b/src/Exception/RuntimeException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/StreamExistsAlready.php b/src/Exception/StreamExistsAlready.php index 2fa4f097..1a42ff5d 100644 --- a/src/Exception/StreamExistsAlready.php +++ b/src/Exception/StreamExistsAlready.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/StreamNotFound.php b/src/Exception/StreamNotFound.php index 957d6db9..09f7b1b6 100644 --- a/src/Exception/StreamNotFound.php +++ b/src/Exception/StreamNotFound.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/TransactionAlreadyStarted.php b/src/Exception/TransactionAlreadyStarted.php index eeac1cf8..24a3487b 100644 --- a/src/Exception/TransactionAlreadyStarted.php +++ b/src/Exception/TransactionAlreadyStarted.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/TransactionNotStarted.php b/src/Exception/TransactionNotStarted.php index 6666a1b6..6a590206 100644 --- a/src/Exception/TransactionNotStarted.php +++ b/src/Exception/TransactionNotStarted.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/InMemoryEventStore.php b/src/InMemoryEventStore.php index 457fe9e7..5196eb42 100644 --- a/src/InMemoryEventStore.php +++ b/src/InMemoryEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Metadata/FieldType.php b/src/Metadata/FieldType.php index ca983d69..137343b1 100644 --- a/src/Metadata/FieldType.php +++ b/src/Metadata/FieldType.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Metadata/MetadataEnricher.php b/src/Metadata/MetadataEnricher.php index e9f07102..a6477cd7 100644 --- a/src/Metadata/MetadataEnricher.php +++ b/src/Metadata/MetadataEnricher.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Metadata/MetadataEnricherAggregate.php b/src/Metadata/MetadataEnricherAggregate.php index 40bc0a6e..9e1039c4 100644 --- a/src/Metadata/MetadataEnricherAggregate.php +++ b/src/Metadata/MetadataEnricherAggregate.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Metadata/MetadataEnricherPlugin.php b/src/Metadata/MetadataEnricherPlugin.php index 8479c08c..3391bf34 100644 --- a/src/Metadata/MetadataEnricherPlugin.php +++ b/src/Metadata/MetadataEnricherPlugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Metadata/MetadataMatcher.php b/src/Metadata/MetadataMatcher.php index fc43366c..1c185c95 100644 --- a/src/Metadata/MetadataMatcher.php +++ b/src/Metadata/MetadataMatcher.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Metadata/Operator.php b/src/Metadata/Operator.php index 45904974..154b71a5 100644 --- a/src/Metadata/Operator.php +++ b/src/Metadata/Operator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/NonTransactionalInMemoryEventStore.php b/src/NonTransactionalInMemoryEventStore.php index 7844ac50..297f578e 100644 --- a/src/NonTransactionalInMemoryEventStore.php +++ b/src/NonTransactionalInMemoryEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Plugin/AbstractPlugin.php b/src/Plugin/AbstractPlugin.php index e392dc72..e679a8d7 100644 --- a/src/Plugin/AbstractPlugin.php +++ b/src/Plugin/AbstractPlugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Plugin/Plugin.php b/src/Plugin/Plugin.php index f7e90526..4735bdea 100644 --- a/src/Plugin/Plugin.php +++ b/src/Plugin/Plugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Plugin/UpcastingPlugin.php b/src/Plugin/UpcastingPlugin.php index 8da24b58..33b1de62 100644 --- a/src/Plugin/UpcastingPlugin.php +++ b/src/Plugin/UpcastingPlugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/AbstractReadModel.php b/src/Projection/AbstractReadModel.php index dfcbc9e2..40d60bf3 100644 --- a/src/Projection/AbstractReadModel.php +++ b/src/Projection/AbstractReadModel.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/InMemoryEventStoreProjector.php b/src/Projection/InMemoryEventStoreProjector.php index 8961b51f..b111367b 100644 --- a/src/Projection/InMemoryEventStoreProjector.php +++ b/src/Projection/InMemoryEventStoreProjector.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/InMemoryEventStoreQuery.php b/src/Projection/InMemoryEventStoreQuery.php index dca07842..cda795f4 100644 --- a/src/Projection/InMemoryEventStoreQuery.php +++ b/src/Projection/InMemoryEventStoreQuery.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/InMemoryEventStoreReadModelProjector.php b/src/Projection/InMemoryEventStoreReadModelProjector.php index 22d74871..8d7d4055 100644 --- a/src/Projection/InMemoryEventStoreReadModelProjector.php +++ b/src/Projection/InMemoryEventStoreReadModelProjector.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/InMemoryProjectionManager.php b/src/Projection/InMemoryProjectionManager.php index 4391eea3..dce5a45a 100644 --- a/src/Projection/InMemoryProjectionManager.php +++ b/src/Projection/InMemoryProjectionManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/ProjectionManager.php b/src/Projection/ProjectionManager.php index d6646460..362eb21c 100644 --- a/src/Projection/ProjectionManager.php +++ b/src/Projection/ProjectionManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/ProjectionStatus.php b/src/Projection/ProjectionStatus.php index 986a312b..62addc4e 100644 --- a/src/Projection/ProjectionStatus.php +++ b/src/Projection/ProjectionStatus.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/Projector.php b/src/Projection/Projector.php index 873068a9..3a81cc60 100644 --- a/src/Projection/Projector.php +++ b/src/Projection/Projector.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/Query.php b/src/Projection/Query.php index 7b5cb9c0..c22a65ae 100644 --- a/src/Projection/Query.php +++ b/src/Projection/Query.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/ReadModel.php b/src/Projection/ReadModel.php index f774fc35..1f16c6e2 100644 --- a/src/Projection/ReadModel.php +++ b/src/Projection/ReadModel.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projection/ReadModelProjector.php b/src/Projection/ReadModelProjector.php index e2413a46..3c6b9cab 100644 --- a/src/Projection/ReadModelProjector.php +++ b/src/Projection/ReadModelProjector.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ReadOnlyEventStore.php b/src/ReadOnlyEventStore.php index cb213dd0..1dba2bb7 100644 --- a/src/ReadOnlyEventStore.php +++ b/src/ReadOnlyEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ReadOnlyEventStoreWrapper.php b/src/ReadOnlyEventStoreWrapper.php index 91a09d3d..d49e92cc 100644 --- a/src/ReadOnlyEventStoreWrapper.php +++ b/src/ReadOnlyEventStoreWrapper.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Stream.php b/src/Stream.php index 83dc6306..80ff4846 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/StreamIterator/EmptyStreamIterator.php b/src/StreamIterator/EmptyStreamIterator.php index d1874511..db95b601 100644 --- a/src/StreamIterator/EmptyStreamIterator.php +++ b/src/StreamIterator/EmptyStreamIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/StreamIterator/InMemoryStreamIterator.php b/src/StreamIterator/InMemoryStreamIterator.php index 9dee7aa1..5fb6bd05 100644 --- a/src/StreamIterator/InMemoryStreamIterator.php +++ b/src/StreamIterator/InMemoryStreamIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/StreamIterator/MergedStreamIterator.php b/src/StreamIterator/MergedStreamIterator.php index 083e689b..ce85098e 100644 --- a/src/StreamIterator/MergedStreamIterator.php +++ b/src/StreamIterator/MergedStreamIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/StreamIterator/StreamIterator.php b/src/StreamIterator/StreamIterator.php index 58e89361..0507c0e5 100644 --- a/src/StreamIterator/StreamIterator.php +++ b/src/StreamIterator/StreamIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/StreamIterator/TimSort.php b/src/StreamIterator/TimSort.php index f7208466..28be8977 100644 --- a/src/StreamIterator/TimSort.php +++ b/src/StreamIterator/TimSort.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/StreamName.php b/src/StreamName.php index 06b61fa8..81218127 100644 --- a/src/StreamName.php +++ b/src/StreamName.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/TransactionalActionEventEmitterEventStore.php b/src/TransactionalActionEventEmitterEventStore.php index cdddaf87..e574ebe6 100644 --- a/src/TransactionalActionEventEmitterEventStore.php +++ b/src/TransactionalActionEventEmitterEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/TransactionalEventStore.php b/src/TransactionalEventStore.php index 43a44968..4ded67fa 100644 --- a/src/TransactionalEventStore.php +++ b/src/TransactionalEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Upcasting/NoOpEventUpcaster.php b/src/Upcasting/NoOpEventUpcaster.php index 5492c18f..127d08b9 100644 --- a/src/Upcasting/NoOpEventUpcaster.php +++ b/src/Upcasting/NoOpEventUpcaster.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Upcasting/SingleEventUpcaster.php b/src/Upcasting/SingleEventUpcaster.php index c17c0cbc..090ec833 100644 --- a/src/Upcasting/SingleEventUpcaster.php +++ b/src/Upcasting/SingleEventUpcaster.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Upcasting/Upcaster.php b/src/Upcasting/Upcaster.php index 4d6428ff..bd3cec7e 100644 --- a/src/Upcasting/Upcaster.php +++ b/src/Upcasting/Upcaster.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Upcasting/UpcasterChain.php b/src/Upcasting/UpcasterChain.php index eb560acc..16f6e3e5 100644 --- a/src/Upcasting/UpcasterChain.php +++ b/src/Upcasting/UpcasterChain.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Upcasting/UpcastingIterator.php b/src/Upcasting/UpcastingIterator.php index c2b94d94..7142281b 100644 --- a/src/Upcasting/UpcastingIterator.php +++ b/src/Upcasting/UpcastingIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Util/ArrayCache.php b/src/Util/ArrayCache.php index accb519b..2bcfaa26 100644 --- a/src/Util/ArrayCache.php +++ b/src/Util/ArrayCache.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Util/Assertion.php b/src/Util/Assertion.php index b562a73c..56e91545 100644 --- a/src/Util/Assertion.php +++ b/src/Util/Assertion.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/AbstractEventStoreTest.php b/tests/AbstractEventStoreTest.php index 7cc712c0..f30a3213 100644 --- a/tests/AbstractEventStoreTest.php +++ b/tests/AbstractEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -28,13 +28,15 @@ 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 */ abstract class AbstractEventStoreTest extends TestCase { - use EventStoreTestStreamTrait; + use EventStoreTestStreamTrait, + ProphecyTrait; /** * @var EventStore diff --git a/tests/ActionEventEmitterEventStoreTest.php b/tests/ActionEventEmitterEventStoreTest.php index 42e90071..ed83c06a 100644 --- a/tests/ActionEventEmitterEventStoreTest.php +++ b/tests/ActionEventEmitterEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -25,10 +25,12 @@ use Prooph\EventStore\Metadata\Operator; use Prooph\EventStore\StreamName; use ProophTest\EventStore\Mock\UsernameChanged; +use Prophecy\PhpUnit\ProphecyTrait; class ActionEventEmitterEventStoreTest extends ActionEventEmitterEventStoreTestCase { - use EventStoreTestStreamTrait; + use EventStoreTestStreamTrait, + ProphecyTrait; /** * @test diff --git a/tests/ActionEventEmitterEventStoreTestCase.php b/tests/ActionEventEmitterEventStoreTestCase.php index a8ac8c85..5fa6d6ae 100644 --- a/tests/ActionEventEmitterEventStoreTestCase.php +++ b/tests/ActionEventEmitterEventStoreTestCase.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Container/InMemoryEventStoreFactoryTest.php b/tests/Container/InMemoryEventStoreFactoryTest.php index e3652d81..34ba0c44 100644 --- a/tests/Container/InMemoryEventStoreFactoryTest.php +++ b/tests/Container/InMemoryEventStoreFactoryTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -31,10 +31,13 @@ use ProophTest\EventStore\Mock\UserCreated; use ProophTest\EventStore\Mock\UsernameChanged; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Psr\Container\ContainerInterface; 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->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->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->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->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->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->method('get')->with('config')->willReturn($config); $type = 'another'; $eventStore = InMemoryEventStoreFactory::$type($containerMock); @@ -141,8 +144,9 @@ 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->method('get') + ->withConsecutive(['config'], ['event_emitter']) + ->willReturnOnConsecutiveCalls($config, $eventEmitterMock); $factory = new InMemoryEventStoreFactory(); $eventStore = $factory($containerMock); @@ -161,8 +165,9 @@ 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->method('get') + ->withConsecutive(['config'], ['plugin']) + ->willReturnOnConsecutiveCalls($config, $featureMock->reveal()); $factory = new InMemoryEventStoreFactory(); $eventStore = $factory($containerMock); @@ -183,8 +188,9 @@ 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->method('get') + ->withConsecutive(['config'], ['plugin']) + ->willReturnOnConsecutiveCalls($config, $featureMock); $factory = new InMemoryEventStoreFactory(); $factory($containerMock); diff --git a/tests/Container/InMemoryProjectionManagerFactoryTest.php b/tests/Container/InMemoryProjectionManagerFactoryTest.php index ce7b5e2f..ec7a9438 100644 --- a/tests/Container/InMemoryProjectionManagerFactoryTest.php +++ b/tests/Container/InMemoryProjectionManagerFactoryTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,10 +18,13 @@ use Prooph\EventStore\Exception\InvalidArgumentException; use Prooph\EventStore\InMemoryEventStore; use Prooph\EventStore\Projection\InMemoryProjectionManager; +use Prophecy\PhpUnit\ProphecyTrait; use Psr\Container\ContainerInterface; class InMemoryProjectionManagerFactoryTest extends TestCase { + use ProphecyTrait; + /** * @test */ diff --git a/tests/EventStoreTestStreamTrait.php b/tests/EventStoreTestStreamTrait.php index 9c6dce76..4c04f2d5 100644 --- a/tests/EventStoreTestStreamTrait.php +++ b/tests/EventStoreTestStreamTrait.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Example/QuickStartTest.php b/tests/Example/QuickStartTest.php index 6127ca44..f31d0648 100644 --- a/tests/Example/QuickStartTest.php +++ b/tests/Example/QuickStartTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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/InMemoryEventStoreTest.php b/tests/InMemoryEventStoreTest.php index b5b45719..70613050 100644 --- a/tests/InMemoryEventStoreTest.php +++ b/tests/InMemoryEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Metadata/MetadataEnricherAggregateTest.php b/tests/Metadata/MetadataEnricherAggregateTest.php index 207b9df2..c54bb730 100644 --- a/tests/Metadata/MetadataEnricherAggregateTest.php +++ b/tests/Metadata/MetadataEnricherAggregateTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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..c446d11d 100644 --- a/tests/Metadata/MetadataEnricherPluginTest.php +++ b/tests/Metadata/MetadataEnricherPluginTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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/Metadata/MetadataMatcherTest.php b/tests/Metadata/MetadataMatcherTest.php index 618dd984..017d6ee2 100644 --- a/tests/Metadata/MetadataMatcherTest.php +++ b/tests/Metadata/MetadataMatcherTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/EventLoggerPlugin.php b/tests/Mock/EventLoggerPlugin.php index e53ac64c..74bf278c 100644 --- a/tests/Mock/EventLoggerPlugin.php +++ b/tests/Mock/EventLoggerPlugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/Post.php b/tests/Mock/Post.php index b36578bd..832c272a 100644 --- a/tests/Mock/Post.php +++ b/tests/Mock/Post.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/PostCreated.php b/tests/Mock/PostCreated.php index 6167898d..b8c6adcc 100644 --- a/tests/Mock/PostCreated.php +++ b/tests/Mock/PostCreated.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/Product.php b/tests/Mock/Product.php index 01e19be0..6af1d409 100644 --- a/tests/Mock/Product.php +++ b/tests/Mock/Product.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/ReadModelMock.php b/tests/Mock/ReadModelMock.php index 07cfcc05..35adecf4 100644 --- a/tests/Mock/ReadModelMock.php +++ b/tests/Mock/ReadModelMock.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/TestDomainEvent.php b/tests/Mock/TestDomainEvent.php index 19826d38..ea2c7fb1 100644 --- a/tests/Mock/TestDomainEvent.php +++ b/tests/Mock/TestDomainEvent.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/TestIteratorAggregate.php b/tests/Mock/TestIteratorAggregate.php index 7e6f274c..0126dbe9 100644 --- a/tests/Mock/TestIteratorAggregate.php +++ b/tests/Mock/TestIteratorAggregate.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/User.php b/tests/Mock/User.php index 782bafa2..6d6ccad6 100644 --- a/tests/Mock/User.php +++ b/tests/Mock/User.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/UserCreated.php b/tests/Mock/UserCreated.php index 2c6020d1..f2bbb655 100644 --- a/tests/Mock/UserCreated.php +++ b/tests/Mock/UserCreated.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Mock/UsernameChanged.php b/tests/Mock/UsernameChanged.php index 51101cfc..42c7c7bf 100644 --- a/tests/Mock/UsernameChanged.php +++ b/tests/Mock/UsernameChanged.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/NonTransactionalInMemoryEventStoreTest.php b/tests/NonTransactionalInMemoryEventStoreTest.php index 79ba8e49..80351e19 100644 --- a/tests/NonTransactionalInMemoryEventStoreTest.php +++ b/tests/NonTransactionalInMemoryEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Plugin/PluginManagerTest.php b/tests/Plugin/PluginManagerTest.php index eb990c6b..04a62c73 100644 --- a/tests/Plugin/PluginManagerTest.php +++ b/tests/Plugin/PluginManagerTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,10 +18,13 @@ use ProophTest\EventStore\ActionEventEmitterEventStoreTestCase; use ProophTest\EventStore\Mock\EventLoggerPlugin; use ProophTest\EventStore\Mock\UserCreated; +use Prophecy\PhpUnit\ProphecyTrait; use Psr\Container\ContainerInterface; class PluginManagerTest extends ActionEventEmitterEventStoreTestCase { + use ProphecyTrait; + /** * @test */ diff --git a/tests/Plugin/UpcastingPluginTest.php b/tests/Plugin/UpcastingPluginTest.php index d85eeda4..6acf1ce4 100644 --- a/tests/Plugin/UpcastingPluginTest.php +++ b/tests/Plugin/UpcastingPluginTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Projection/AbstractEventStoreProjectorTest.php b/tests/Projection/AbstractEventStoreProjectorTest.php index 59887c18..517189da 100644 --- a/tests/Projection/AbstractEventStoreProjectorTest.php +++ b/tests/Projection/AbstractEventStoreProjectorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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..d52e4a23 100644 --- a/tests/Projection/AbstractEventStoreQueryTest.php +++ b/tests/Projection/AbstractEventStoreQueryTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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..b443b8e1 100644 --- a/tests/Projection/AbstractEventStoreReadModelProjectorTest.php +++ b/tests/Projection/AbstractEventStoreReadModelProjectorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,12 +29,15 @@ use ProophTest\EventStore\Mock\ReadModelMock; use ProophTest\EventStore\Mock\UserCreated; use ProophTest\EventStore\Mock\UsernameChanged; +use Prophecy\PhpUnit\ProphecyTrait; /** * Common tests for all event store read model projector implementations */ abstract class AbstractEventStoreReadModelProjectorTest extends TestCase { + use ProphecyTrait; + /** * @var ProjectionManager */ @@ -418,13 +421,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/AbstractProjectionManagerTest.php b/tests/Projection/AbstractProjectionManagerTest.php index 46261ed4..4d837c26 100644 --- a/tests/Projection/AbstractProjectionManagerTest.php +++ b/tests/Projection/AbstractProjectionManagerTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -32,6 +32,7 @@ abstract class AbstractProjectionManagerTest extends TestCase /** * @test + * @medium */ public function it_fetches_projection_names(): void { @@ -157,6 +158,7 @@ public function it_throws_exception_when_fetching_projection_names_using_invalid /** * @test + * @medium */ public function it_fetches_projection_names_using_regex(): void { diff --git a/tests/Projection/InMemoryEventStoreProjectorTest.php b/tests/Projection/InMemoryEventStoreProjectorTest.php index 034de242..15a35a57 100644 --- a/tests/Projection/InMemoryEventStoreProjectorTest.php +++ b/tests/Projection/InMemoryEventStoreProjectorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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 */ @@ -178,6 +181,7 @@ public function it_throws_exception_when_invalid_sleep_given(): void /** * @test + * @medium */ public function it_dispatches_pcntl_signals_when_enabled(): void { diff --git a/tests/Projection/InMemoryEventStoreQueryTest.php b/tests/Projection/InMemoryEventStoreQueryTest.php index 516c6b40..6d99ee8f 100644 --- a/tests/Projection/InMemoryEventStoreQueryTest.php +++ b/tests/Projection/InMemoryEventStoreQueryTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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..9968b686 100644 --- a/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php +++ b/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -189,6 +189,7 @@ public function it_allows_non_transactional_event_store_instance(): void /** * @test + * @medium */ public function it_dispatches_pcntl_signals_when_enabled(): void { diff --git a/tests/Projection/InMemoryProjectionManagerTest.php b/tests/Projection/InMemoryProjectionManagerTest.php index 7a40659d..6a99d64b 100644 --- a/tests/Projection/InMemoryProjectionManagerTest.php +++ b/tests/Projection/InMemoryProjectionManagerTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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/Projection/isolated-long-running-projection.php b/tests/Projection/isolated-long-running-projection.php index f54c36c9..2b5515d3 100755 --- a/tests/Projection/isolated-long-running-projection.php +++ b/tests/Projection/isolated-long-running-projection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Projection/isolated-long-running-query.php b/tests/Projection/isolated-long-running-query.php index e7805e0d..f2170c8c 100755 --- a/tests/Projection/isolated-long-running-query.php +++ b/tests/Projection/isolated-long-running-query.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Projection/isolated-long-running-read-model-projection.php b/tests/Projection/isolated-long-running-read-model-projection.php index 62dfdcde..90b06aa8 100755 --- a/tests/Projection/isolated-long-running-read-model-projection.php +++ b/tests/Projection/isolated-long-running-read-model-projection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Projection/isolated-projection.php b/tests/Projection/isolated-projection.php index f1f261ea..e1862d75 100755 --- a/tests/Projection/isolated-projection.php +++ b/tests/Projection/isolated-projection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Projection/isolated-read-model-projection.php b/tests/Projection/isolated-read-model-projection.php index 0a496e07..c0919b2c 100755 --- a/tests/Projection/isolated-read-model-projection.php +++ b/tests/Projection/isolated-read-model-projection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/ReadOnlyEventStoreWrapperTest.php b/tests/ReadOnlyEventStoreWrapperTest.php index 0b4762eb..0315e515 100644 --- a/tests/ReadOnlyEventStoreWrapperTest.php +++ b/tests/ReadOnlyEventStoreWrapperTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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/StreamIterator/AbstractStreamIteratorTest.php b/tests/StreamIterator/AbstractStreamIteratorTest.php index afd8b3c1..37021bfc 100644 --- a/tests/StreamIterator/AbstractStreamIteratorTest.php +++ b/tests/StreamIterator/AbstractStreamIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/StreamIterator/EmptyStreamIteratorTest.php b/tests/StreamIterator/EmptyStreamIteratorTest.php index 17175f2e..21748fad 100644 --- a/tests/StreamIterator/EmptyStreamIteratorTest.php +++ b/tests/StreamIterator/EmptyStreamIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/StreamIterator/InMemoryStreamIteratorTest.php b/tests/StreamIterator/InMemoryStreamIteratorTest.php index 026f8ae5..b59738b4 100644 --- a/tests/StreamIterator/InMemoryStreamIteratorTest.php +++ b/tests/StreamIterator/InMemoryStreamIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/StreamIterator/MergedStreamIteratorTest.php b/tests/StreamIterator/MergedStreamIteratorTest.php index ff926d69..3c5836da 100644 --- a/tests/StreamIterator/MergedStreamIteratorTest.php +++ b/tests/StreamIterator/MergedStreamIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -152,6 +152,7 @@ public function getStreamsLarge($numberOfEvents = 977): array /** * @test + * @large */ public function it_returns_messages_in_order_for_large_streams(): void { diff --git a/tests/StreamNameTest.php b/tests/StreamNameTest.php index aa613f73..bb5c41c9 100644 --- a/tests/StreamNameTest.php +++ b/tests/StreamNameTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/TransactionalActionEventEmitterEventStoreTest.php b/tests/TransactionalActionEventEmitterEventStoreTest.php index bec12de0..0bef9f24 100644 --- a/tests/TransactionalActionEventEmitterEventStoreTest.php +++ b/tests/TransactionalActionEventEmitterEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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 EventStoreTestStreamTrait, + ProphecyTrait; /** * @var TransactionalActionEventEmitterEventStore diff --git a/tests/TransactionalEventStoreTestTrait.php b/tests/TransactionalEventStoreTestTrait.php index b7dbe6f8..b33690a6 100644 --- a/tests/TransactionalEventStoreTestTrait.php +++ b/tests/TransactionalEventStoreTestTrait.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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..852551c9 100644 --- a/tests/Upcasting/NoOpEventUpcasterTest.php +++ b/tests/Upcasting/NoOpEventUpcasterTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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..bc10023d 100644 --- a/tests/Upcasting/SingleEventUpcasterTest.php +++ b/tests/Upcasting/SingleEventUpcasterTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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..b1d0e82a 100644 --- a/tests/Upcasting/UpcasterChainTest.php +++ b/tests/Upcasting/UpcasterChainTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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..eb1a4260 100644 --- a/tests/Upcasting/UpcastingIteratorTest.php +++ b/tests/Upcasting/UpcastingIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -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 */ diff --git a/tests/Util/ArrayCacheTest.php b/tests/Util/ArrayCacheTest.php index a297914b..b2643416 100644 --- a/tests/Util/ArrayCacheTest.php +++ b/tests/Util/ArrayCacheTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2020 prooph software GmbH - * (c) 2015-2020 Sascha-Oliver Prolic + * (c) 2014-2021 prooph software GmbH + * (c) 2015-2021 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code.