diff --git a/Test/Unit/Model/UrlFinder/EntityTest.php b/Test/Unit/Model/UrlFinder/EntityTest.php index 4297b7b..a2c16be 100644 --- a/Test/Unit/Model/UrlFinder/EntityTest.php +++ b/Test/Unit/Model/UrlFinder/EntityTest.php @@ -40,7 +40,7 @@ class EntityTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->urlFactoryMock = $this->createMock(UrlFactory::class); $this->urlFinderMock = $this->getMockForAbstractClass(UrlFinderInterface::class); diff --git a/Test/Unit/Model/UrlFinderFactoryTest.php b/Test/Unit/Model/UrlFinderFactoryTest.php index 483c28c..7493287 100644 --- a/Test/Unit/Model/UrlFinderFactoryTest.php +++ b/Test/Unit/Model/UrlFinderFactoryTest.php @@ -34,7 +34,7 @@ class UrlFinderFactoryTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->objectManagerMock = $this->getMockForAbstractClass(ObjectManagerInterface::class); diff --git a/Test/Unit/Model/UrlFixerTest.php b/Test/Unit/Model/UrlFixerTest.php index 452510e..c17f428 100644 --- a/Test/Unit/Model/UrlFixerTest.php +++ b/Test/Unit/Model/UrlFixerTest.php @@ -30,9 +30,13 @@ class UrlFixerTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { - $this->storeMock = $this->createPartialMock(Store::class, ['getForceDisableRewrites', 'getConfig']); + $this->storeMock = $this->getMockBuilder(Store::class) + ->disableOriginalConstructor() + ->onlyMethods(['getConfig']) + ->addMethods(['getForceDisableRewrites']) + ->getMock(); $this->urlFixer = new UrlFixer(); } diff --git a/composer.json b/composer.json index 1a22056..85faa33 100644 --- a/composer.json +++ b/composer.json @@ -2,9 +2,9 @@ "name": "magento/magento-cloud-components", "description": "Cloud Components Module for Magento 2.x", "type": "magento2-module", - "version": "1.0.9", + "version": "1.0.10", "require": { - "php": "^7.1", + "php": "^7.2 || ^8.0", "ext-json": "*", "colinmollenhour/cache-backend-redis": "^1.9", "colinmollenhour/credis": "^1.6" @@ -15,11 +15,15 @@ "magento/module-url-rewrite": "*" }, "require-dev": { - "codeception/codeception": "^2.5.3", + "codeception/codeception": "^4.1", + "codeception/module-asserts": "^1.2", + "codeception/module-db": "^1.0", + "codeception/module-phpbrowser": "^1.0", + "codeception/module-rest": "^1.2", "consolidation/robo": "^1.2", "phpmd/phpmd": "@stable", - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "^7.2", + "phpstan/phpstan": "^0.11 || ^0.12.77", + "phpunit/phpunit": "^7.2 || ^9.5", "squizlabs/php_codesniffer": "^3.0" }, "config": { @@ -32,9 +36,9 @@ "@phpmd", "@phpunit" ], - "phpstan": "phpstan analyse -c test/static/phpstan.neon", - "phpcs": "phpcs ./ --standard=test/static/phpcs-ruleset.xml -p -n", - "phpmd": "phpmd Console xml test/static/phpmd-ruleset.xml", + "phpstan": "phpstan analyse -c tests/static/phpstan.neon", + "phpcs": "phpcs ./ --standard=tests/static/phpcs-ruleset.xml -p -n", + "phpmd": "phpmd Console xml tests/static/phpmd-ruleset.xml", "phpunit": "phpunit --configuration Test/Unit", "pre-install-cmd": "@install_suggested", "pre-update-cmd": "@install_suggested", diff --git a/tests/static/phpstan.neon b/tests/static/phpstan.neon index bd88537..6c56a69 100644 --- a/tests/static/phpstan.neon +++ b/tests/static/phpstan.neon @@ -1,8 +1,9 @@ parameters: level: 1 paths: - - Console - - Model + - %currentWorkingDirectory%/Console + - %currentWorkingDirectory%/Model + - %currentWorkingDirectory%/Cron excludes_analyse: - %currentWorkingDirectory%/Test/* ignoreErrors: