diff --git a/composer.json b/composer.json index 63d196d8..92c2ff75 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/magento-cloud-patches", "description": "Provides critical fixes for Magento 2 Enterprise Edition", "type": "magento2-component", - "version": "1.0.14", + "version": "1.0.15", "license": "OSL-3.0", "repositories": { "repo.magento.com": { @@ -11,7 +11,7 @@ } }, "require": { - "php": "^7.0", + "php": "^7.2 || ^8.0", "ext-json": "*", "composer/composer": "@stable", "composer/semver": "@stable", @@ -25,10 +25,14 @@ "magento/quality-patches": "^1.1.0" }, "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", - "phpunit/phpunit": "^7.2", + "phpunit/phpunit": "^8.5 || ^9.5", "squizlabs/php_codesniffer": "^3.0" }, "bin": [ diff --git a/src/Test/Functional/Acceptance/AbstractCest.php b/src/Test/Functional/Acceptance/AbstractCest.php index e893f878..d3374bbc 100644 --- a/src/Test/Functional/Acceptance/AbstractCest.php +++ b/src/Test/Functional/Acceptance/AbstractCest.php @@ -37,28 +37,26 @@ protected function prepareTemplate(\CliTester $I, string $templateVersion, strin $I->createArtifactsDir(); $I->createArtifactCurrentTestedCode('patches', '1.0.99'); $I->addArtifactsRepoToComposer(); + $I->addDependencyToComposer('magento/magento-cloud-patches', '1.0.99'); + $I->addEceDockerGitRepoToComposer(); $I->addQualityPatchesGitRepoToComposer(); $I->addEceToolsGitRepoToComposer(); $I->addCloudComponentsGitRepoToComposer(); - $I->addDependencyToComposer('magento/magento-cloud-patches', '1.0.99'); - $I->addDependencyToComposer( - 'magento/magento-cloud-docker', - $I->getDependencyVersion('magento/magento-cloud-docker') - ); - $I->addDependencyToComposer( - 'magento/quality-patches', - $I->getDependencyVersion('magento/quality-patches') - ); - $I->addDependencyToComposer( + $dependencies = [ + 'magento/magento-cloud-docker', 'magento/magento-cloud-components', - $I->getDependencyVersion('magento/magento-cloud-components') - ); - $I->addDependencyToComposer( + 'magento/quality-patches', 'magento/ece-tools', - $I->getDependencyVersion('magento/ece-tools') - ); + ]; + + foreach ($dependencies as $dependency) { + $I->assertTrue( + $I->addDependencyToComposer($dependency, $I->getDependencyVersion($dependency)), + 'Can not add dependency ' . $dependency + ); + } if ($this->edition === 'CE' || $magentoVersion) { $version = $magentoVersion ?: $this->getVersionRangeForMagento($I); diff --git a/src/Test/Functional/Acceptance/Acceptance74CeCest.php b/src/Test/Functional/Acceptance/Acceptance74CeCest.php new file mode 100644 index 00000000..48751afe --- /dev/null +++ b/src/Test/Functional/Acceptance/Acceptance74CeCest.php @@ -0,0 +1,19 @@ + '2.4.0', 'magentoVersion' => '2.4.0'], + ['templateVersion' => '2.4.0', 'magentoVersion' => '2.4.0-p1'], + ['templateVersion' => '2.4.1', 'magentoVersion' => '2.4.1'], + ['templateVersion' => '2.4.1', 'magentoVersion' => '2.4.1-p1'], + ['templateVersion' => '2.4.2', 'magentoVersion' => '2.4.2'], + ['templateVersion' => '2.4.2', 'magentoVersion' => '2.4.2-p1'], + ['templateVersion' => '2.4.2', 'magentoVersion' => '2.4.2-p2'], + ['templateVersion' => '2.4.3', 'magentoVersion' => '2.4.3'], + ['templateVersion' => '2.4.3', 'magentoVersion' => '2.4.3-p1'], + ]; + } +} diff --git a/src/Test/Functional/Acceptance/AcceptanceCeCest.php b/src/Test/Functional/Acceptance/AcceptanceCeCest.php index dd234d47..c3d98f22 100644 --- a/src/Test/Functional/Acceptance/AcceptanceCeCest.php +++ b/src/Test/Functional/Acceptance/AcceptanceCeCest.php @@ -8,7 +8,7 @@ namespace Magento\CloudPatches\Test\Functional\Acceptance; /** - * @group php74ce + * @group php81ce */ class AcceptanceCeCest extends AcceptanceCest { diff --git a/src/Test/Functional/Acceptance/AcceptanceCest.php b/src/Test/Functional/Acceptance/AcceptanceCest.php index 50938081..5728a525 100644 --- a/src/Test/Functional/Acceptance/AcceptanceCest.php +++ b/src/Test/Functional/Acceptance/AcceptanceCest.php @@ -8,7 +8,7 @@ namespace Magento\CloudPatches\Test\Functional\Acceptance; /** - * @group php74 + * @group php81 */ class AcceptanceCest extends AbstractCest { @@ -49,16 +49,7 @@ public function testPatches(\CliTester $I, \Codeception\Example $data): void protected function patchesDataProvider(): array { return [ - ['templateVersion' => '2.4.0', 'magentoVersion' => '2.4.0'], - ['templateVersion' => '2.4.0', 'magentoVersion' => '2.4.0-p1'], - ['templateVersion' => '2.4.1', 'magentoVersion' => '2.4.1'], - ['templateVersion' => '2.4.1', 'magentoVersion' => '2.4.1-p1'], - ['templateVersion' => '2.4.2', 'magentoVersion' => '2.4.2'], - ['templateVersion' => '2.4.2', 'magentoVersion' => '2.4.2-p1'], - ['templateVersion' => '2.4.2', 'magentoVersion' => '2.4.2-p2'], - ['templateVersion' => '2.4.3', 'magentoVersion' => '2.4.3'], - ['templateVersion' => '2.4.3', 'magentoVersion' => '2.4.3-p1'], - ['templateVersion' => 'master'], + ['templateVersion' => '2.4.4'], ]; } } diff --git a/src/Test/Functional/Acceptance/PatchApplierCest.php b/src/Test/Functional/Acceptance/PatchApplierCest.php index d3c7b686..e6343c96 100644 --- a/src/Test/Functional/Acceptance/PatchApplierCest.php +++ b/src/Test/Functional/Acceptance/PatchApplierCest.php @@ -10,7 +10,7 @@ use Magento\CloudDocker\Test\Functional\Codeception\Docker; /** - * @group php74 + * @group php81 */ class PatchApplierCest extends AbstractCest { @@ -21,7 +21,7 @@ public function _before(\CliTester $I): void { parent::_before($I); - $this->prepareTemplate($I, 'master'); + $this->prepareTemplate($I, '2.4.4'); $I->copyFileToWorkDir('files/debug_logging/.magento.env.yaml', '.magento.env.yaml'); } diff --git a/src/Test/Unit/Command/ApplyTest.php b/src/Test/Unit/Command/ApplyTest.php index b88db0dc..58e8f42c 100644 --- a/src/Test/Unit/Command/ApplyTest.php +++ b/src/Test/Unit/Command/ApplyTest.php @@ -46,7 +46,7 @@ class ApplyTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->applyOptional = $this->createMock(ApplyOptional::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Command/Ece/ApplyTest.php b/src/Test/Unit/Command/Ece/ApplyTest.php index 8b9906c0..eafba6ed 100644 --- a/src/Test/Unit/Command/Ece/ApplyTest.php +++ b/src/Test/Unit/Command/Ece/ApplyTest.php @@ -58,7 +58,7 @@ class ApplyTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->applyLocal = $this->createMock(ApplyLocal::class); $this->applyOptionalEce = $this->createMock(ApplyOptional::class); diff --git a/src/Test/Unit/Command/Ece/RevertTest.php b/src/Test/Unit/Command/Ece/RevertTest.php index 55f9075a..573ab13b 100644 --- a/src/Test/Unit/Command/Ece/RevertTest.php +++ b/src/Test/Unit/Command/Ece/RevertTest.php @@ -41,7 +41,7 @@ class RevertTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->revertEce = $this->createMock(RevertProcess::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Command/Process/Action/ApplyOptionalActionTest.php b/src/Test/Unit/Command/Process/Action/ApplyOptionalActionTest.php index c543a2de..eb0c62ff 100644 --- a/src/Test/Unit/Command/Process/Action/ApplyOptionalActionTest.php +++ b/src/Test/Unit/Command/Process/Action/ApplyOptionalActionTest.php @@ -65,7 +65,7 @@ class ApplyOptionalActionTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->applier = $this->createMock(Applier::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Command/Process/Action/ConfirmRequiredActionTest.php b/src/Test/Unit/Command/Process/Action/ConfirmRequiredActionTest.php index 1424fafb..2d374ca9 100644 --- a/src/Test/Unit/Command/Process/Action/ConfirmRequiredActionTest.php +++ b/src/Test/Unit/Command/Process/Action/ConfirmRequiredActionTest.php @@ -54,7 +54,7 @@ class ConfirmRequiredActionTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->statusPool = $this->createMock(StatusPool::class); $this->optionalPool = $this->createMock(OptionalPool::class); diff --git a/src/Test/Unit/Command/Process/Action/ProcessDeprecatedActionTest.php b/src/Test/Unit/Command/Process/Action/ProcessDeprecatedActionTest.php index 50dd537c..441a0722 100644 --- a/src/Test/Unit/Command/Process/Action/ProcessDeprecatedActionTest.php +++ b/src/Test/Unit/Command/Process/Action/ProcessDeprecatedActionTest.php @@ -65,7 +65,7 @@ class ProcessDeprecatedActionTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->optionalPool = $this->createMock(OptionalPool::class); $this->statusPool = $this->createMock(StatusPool::class); diff --git a/src/Test/Unit/Command/Process/Action/RevertActionTest.php b/src/Test/Unit/Command/Process/Action/RevertActionTest.php index 9ef6b34c..b8f515e0 100644 --- a/src/Test/Unit/Command/Process/Action/RevertActionTest.php +++ b/src/Test/Unit/Command/Process/Action/RevertActionTest.php @@ -60,7 +60,7 @@ class RevertActionTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->applier = $this->createMock(Applier::class); $this->revertValidator = $this->createMock(RevertValidator::class); diff --git a/src/Test/Unit/Command/Process/Action/ReviewAppliedActionTest.php b/src/Test/Unit/Command/Process/Action/ReviewAppliedActionTest.php index c5224b3b..b793c373 100644 --- a/src/Test/Unit/Command/Process/Action/ReviewAppliedActionTest.php +++ b/src/Test/Unit/Command/Process/Action/ReviewAppliedActionTest.php @@ -52,7 +52,7 @@ class ReviewAppliedActionTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); $this->statusPool = $this->createMock(StatusPool::class); diff --git a/src/Test/Unit/Command/Process/ApplyLocalTest.php b/src/Test/Unit/Command/Process/ApplyLocalTest.php index b9f7e85c..d2212697 100644 --- a/src/Test/Unit/Command/Process/ApplyLocalTest.php +++ b/src/Test/Unit/Command/Process/ApplyLocalTest.php @@ -59,7 +59,7 @@ class ApplyLocalTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->applier = $this->createMock(Applier::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Command/Process/ApplyOptionalTest.php b/src/Test/Unit/Command/Process/ApplyOptionalTest.php index a32b68c9..0b947307 100644 --- a/src/Test/Unit/Command/Process/ApplyOptionalTest.php +++ b/src/Test/Unit/Command/Process/ApplyOptionalTest.php @@ -46,7 +46,7 @@ class ApplyOptionalTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->filterFactory = $this->createMock(FilterFactory::class); $this->actionPool = $this->createMock(ActionPool::class); diff --git a/src/Test/Unit/Command/Process/ApplyRequiredTest.php b/src/Test/Unit/Command/Process/ApplyRequiredTest.php index 9675f5c2..45b794ac 100644 --- a/src/Test/Unit/Command/Process/ApplyRequiredTest.php +++ b/src/Test/Unit/Command/Process/ApplyRequiredTest.php @@ -59,7 +59,7 @@ class ApplyRequiredTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->applier = $this->createMock(Applier::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Command/Process/Ece/ApplyOptionalTest.php b/src/Test/Unit/Command/Process/Ece/ApplyOptionalTest.php index f269a989..4f547b8d 100644 --- a/src/Test/Unit/Command/Process/Ece/ApplyOptionalTest.php +++ b/src/Test/Unit/Command/Process/Ece/ApplyOptionalTest.php @@ -51,7 +51,7 @@ class ApplyOptionalTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->filterFactory = $this->createMock(FilterFactory::class); $this->actionPool = $this->createMock(ActionPool::class); diff --git a/src/Test/Unit/Command/Process/Ece/RevertTest.php b/src/Test/Unit/Command/Process/Ece/RevertTest.php index 1197ba2b..cbba07ac 100644 --- a/src/Test/Unit/Command/Process/Ece/RevertTest.php +++ b/src/Test/Unit/Command/Process/Ece/RevertTest.php @@ -65,7 +65,7 @@ class RevertTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->revertAction = $this->createMock(RevertAction::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Command/Process/RendererTest.php b/src/Test/Unit/Command/Process/RendererTest.php index 6a944b4c..b7b1f66d 100644 --- a/src/Test/Unit/Command/Process/RendererTest.php +++ b/src/Test/Unit/Command/Process/RendererTest.php @@ -43,7 +43,7 @@ class RendererTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { /** @var StatusPool|MockObject $statusPool */ $statusPool = $this->createMock(StatusPool::class); diff --git a/src/Test/Unit/Command/Process/RevertTest.php b/src/Test/Unit/Command/Process/RevertTest.php index 37bb7a55..d2d00a4d 100644 --- a/src/Test/Unit/Command/Process/RevertTest.php +++ b/src/Test/Unit/Command/Process/RevertTest.php @@ -46,7 +46,7 @@ class RevertTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->filterFactory = $this->createMock(FilterFactory::class); $this->revertAction = $this->createMock(RevertAction::class); diff --git a/src/Test/Unit/Command/Process/ShowStatusTest.php b/src/Test/Unit/Command/Process/ShowStatusTest.php index 15fa3f2e..bafd697f 100644 --- a/src/Test/Unit/Command/Process/ShowStatusTest.php +++ b/src/Test/Unit/Command/Process/ShowStatusTest.php @@ -78,7 +78,7 @@ class ShowStatusTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->aggregator = $this->createMock(Aggregator::class); $this->optionalPool = $this->createMock(OptionalPool::class); diff --git a/src/Test/Unit/Command/RevertTest.php b/src/Test/Unit/Command/RevertTest.php index f732ea8c..6494abf7 100644 --- a/src/Test/Unit/Command/RevertTest.php +++ b/src/Test/Unit/Command/RevertTest.php @@ -41,7 +41,7 @@ class RevertTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->revert = $this->createMock(RevertProcess::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Command/StatusTest.php b/src/Test/Unit/Command/StatusTest.php index 31094acd..7cd7eec3 100644 --- a/src/Test/Unit/Command/StatusTest.php +++ b/src/Test/Unit/Command/StatusTest.php @@ -42,7 +42,7 @@ class StatusTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->showStatus = $this->createMock(ShowStatus::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Composer/MagentoVersionTest.php b/src/Test/Unit/Composer/MagentoVersionTest.php index 615b679d..1481b7de 100644 --- a/src/Test/Unit/Composer/MagentoVersionTest.php +++ b/src/Test/Unit/Composer/MagentoVersionTest.php @@ -41,7 +41,7 @@ class MagentoVersionTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->repository = $this->getMockForAbstractClass(WritableRepositoryInterface::class); $this->rootPackage = $this->getMockForAbstractClass(RootPackageInterface::class); diff --git a/src/Test/Unit/Environment/ConfigReaderTest.php b/src/Test/Unit/Environment/ConfigReaderTest.php index ddd0f5ad..04ffcbf6 100644 --- a/src/Test/Unit/Environment/ConfigReaderTest.php +++ b/src/Test/Unit/Environment/ConfigReaderTest.php @@ -37,7 +37,7 @@ class ConfigReaderTest extends TestCase /** * @inheritdoc */ - protected function setUp() + protected function setUp(): void { $this->fileList = $this->createMock(FileList::class); $this->filesystem = $this->createPartialMock(Filesystem::class, ['exists']); diff --git a/src/Test/Unit/Environment/ConfigTest.php b/src/Test/Unit/Environment/ConfigTest.php index 79d33297..fdc8455b 100644 --- a/src/Test/Unit/Environment/ConfigTest.php +++ b/src/Test/Unit/Environment/ConfigTest.php @@ -30,7 +30,7 @@ class ConfigTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->configReader = $this->createMock(ConfigReader::class); diff --git a/src/Test/Unit/Filesystem/DirectoryListTest.php b/src/Test/Unit/Filesystem/DirectoryListTest.php index c2ee383e..7df929f7 100644 --- a/src/Test/Unit/Filesystem/DirectoryListTest.php +++ b/src/Test/Unit/Filesystem/DirectoryListTest.php @@ -33,7 +33,7 @@ class DirectoryListTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->directoryList = new DirectoryList( $this->root, diff --git a/src/Test/Unit/Filesystem/FileListTest.php b/src/Test/Unit/Filesystem/FileListTest.php index f0f019a7..b8db3040 100644 --- a/src/Test/Unit/Filesystem/FileListTest.php +++ b/src/Test/Unit/Filesystem/FileListTest.php @@ -29,7 +29,7 @@ class FileListTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->directoryListMock = $this->createMock(DirectoryList::class); diff --git a/src/Test/Unit/Patch/AggregatedPatchFactoryTest.php b/src/Test/Unit/Patch/AggregatedPatchFactoryTest.php index fa1b8567..d509f6cd 100644 --- a/src/Test/Unit/Patch/AggregatedPatchFactoryTest.php +++ b/src/Test/Unit/Patch/AggregatedPatchFactoryTest.php @@ -26,7 +26,7 @@ class AggregatedPatchFactoryTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->aggregatedPatchFactory = new AggregatedPatchFactory(); } diff --git a/src/Test/Unit/Patch/AggregatorTest.php b/src/Test/Unit/Patch/AggregatorTest.php index 5427dca2..b438c516 100644 --- a/src/Test/Unit/Patch/AggregatorTest.php +++ b/src/Test/Unit/Patch/AggregatorTest.php @@ -31,7 +31,7 @@ class AggregatorTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->aggregatedPatchFactory = $this->createMock(AggregatedPatchFactory::class); $this->aggregator = new Aggregator($this->aggregatedPatchFactory); diff --git a/src/Test/Unit/Patch/ApplierTest.php b/src/Test/Unit/Patch/ApplierTest.php index 89452b6c..fa3330bb 100644 --- a/src/Test/Unit/Patch/ApplierTest.php +++ b/src/Test/Unit/Patch/ApplierTest.php @@ -51,7 +51,7 @@ class ApplierTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->patchCommand = $this->createMock(PatchCommandInterface::class); $this->gitConverter = $this->createMock(GitConverter::class); diff --git a/src/Test/Unit/Patch/Collector/CloudCollectorTest.php b/src/Test/Unit/Patch/Collector/CloudCollectorTest.php index b83df61d..b0a3ff2e 100644 --- a/src/Test/Unit/Patch/Collector/CloudCollectorTest.php +++ b/src/Test/Unit/Patch/Collector/CloudCollectorTest.php @@ -61,7 +61,7 @@ class CloudCollectorTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->sourceProvider = $this->createMock(SourceProvider::class); $this->package = $this->createMock(Package::class); diff --git a/src/Test/Unit/Patch/Collector/LocalCollectorTest.php b/src/Test/Unit/Patch/Collector/LocalCollectorTest.php index 972436dd..7787d081 100644 --- a/src/Test/Unit/Patch/Collector/LocalCollectorTest.php +++ b/src/Test/Unit/Patch/Collector/LocalCollectorTest.php @@ -38,7 +38,7 @@ class LocalCollectorTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->patchBuilder = $this->createMock(PatchBuilder::class); $this->sourceProvider = $this->createMock(SourceProvider::class); diff --git a/src/Test/Unit/Patch/Collector/QualityCollectorTest.php b/src/Test/Unit/Patch/Collector/QualityCollectorTest.php index 19f6d67a..9cf82dc7 100644 --- a/src/Test/Unit/Patch/Collector/QualityCollectorTest.php +++ b/src/Test/Unit/Patch/Collector/QualityCollectorTest.php @@ -59,7 +59,7 @@ class QualityCollectorTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->package = $this->createMock(Package::class); $this->qualityPackage = $this->createMock(QualityPackage::class); diff --git a/src/Test/Unit/Patch/Conflict/AnalyzerTest.php b/src/Test/Unit/Patch/Conflict/AnalyzerTest.php index d8f0bc06..b3c00ff7 100644 --- a/src/Test/Unit/Patch/Conflict/AnalyzerTest.php +++ b/src/Test/Unit/Patch/Conflict/AnalyzerTest.php @@ -49,7 +49,7 @@ class AnalyzerTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->optionalPool = $this->createMock(OptionalPool::class); $this->config = $this->createMock(Config::class); diff --git a/src/Test/Unit/Patch/Conflict/ApplyCheckerTest.php b/src/Test/Unit/Patch/Conflict/ApplyCheckerTest.php index f59d651d..fcbecaed 100644 --- a/src/Test/Unit/Patch/Conflict/ApplyCheckerTest.php +++ b/src/Test/Unit/Patch/Conflict/ApplyCheckerTest.php @@ -43,7 +43,7 @@ class ApplyCheckerTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->optionalPool = $this->createMock(OptionalPool::class); $this->filesystem = $this->createMock(Filesystem::class); diff --git a/src/Test/Unit/Patch/Conflict/ProcessorTest.php b/src/Test/Unit/Patch/Conflict/ProcessorTest.php index c37631f4..20dacd06 100644 --- a/src/Test/Unit/Patch/Conflict/ProcessorTest.php +++ b/src/Test/Unit/Patch/Conflict/ProcessorTest.php @@ -51,7 +51,7 @@ class ProcessorTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->renderer = $this->createMock(Renderer::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Patch/FilterFactoryTest.php b/src/Test/Unit/Patch/FilterFactoryTest.php index db9f2bd8..dbe63fe7 100644 --- a/src/Test/Unit/Patch/FilterFactoryTest.php +++ b/src/Test/Unit/Patch/FilterFactoryTest.php @@ -23,7 +23,7 @@ class FilterFactoryTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->filterFactory = new FilterFactory(); } diff --git a/src/Test/Unit/Patch/GitConverterTest.php b/src/Test/Unit/Patch/GitConverterTest.php index a250edf1..bbeeda58 100644 --- a/src/Test/Unit/Patch/GitConverterTest.php +++ b/src/Test/Unit/Patch/GitConverterTest.php @@ -23,7 +23,7 @@ class GitConverterTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->gitConverter = new GitConverter(); } diff --git a/src/Test/Unit/Patch/PatchBuilderTest.php b/src/Test/Unit/Patch/PatchBuilderTest.php index de7abbef..908f88dd 100644 --- a/src/Test/Unit/Patch/PatchBuilderTest.php +++ b/src/Test/Unit/Patch/PatchBuilderTest.php @@ -35,7 +35,7 @@ class PatchBuilderTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->filesystem = $this->createMock(Filesystem::class); diff --git a/src/Test/Unit/Patch/Pool/OptionalPoolTest.php b/src/Test/Unit/Patch/Pool/OptionalPoolTest.php index 61370979..9796426a 100644 --- a/src/Test/Unit/Patch/Pool/OptionalPoolTest.php +++ b/src/Test/Unit/Patch/Pool/OptionalPoolTest.php @@ -37,7 +37,7 @@ class OptionalPoolTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->cloudCollector = $this->createMock(CloudCollector::class); $this->qualityCollector = $this->createMock(SupportCollector::class); diff --git a/src/Test/Unit/Patch/RevertValidatorTest.php b/src/Test/Unit/Patch/RevertValidatorTest.php index f39dc7fb..7c2e6eca 100644 --- a/src/Test/Unit/Patch/RevertValidatorTest.php +++ b/src/Test/Unit/Patch/RevertValidatorTest.php @@ -37,7 +37,7 @@ class RevertValidatorTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->optionalPool = $this->createMock(OptionalPool::class); $this->statusPool = $this->createMock(StatusPool::class); diff --git a/src/Test/Unit/Patch/RollbackProcessorTest.php b/src/Test/Unit/Patch/RollbackProcessorTest.php index 60a8cfde..7b185b47 100644 --- a/src/Test/Unit/Patch/RollbackProcessorTest.php +++ b/src/Test/Unit/Patch/RollbackProcessorTest.php @@ -37,7 +37,7 @@ class RollbackProcessorTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->applier = $this->createMock(Applier::class); $this->logger = $this->getMockForAbstractClass(LoggerInterface::class); diff --git a/src/Test/Unit/Patch/SourceProviderTest.php b/src/Test/Unit/Patch/SourceProviderTest.php index 15f065a8..f4de6d12 100644 --- a/src/Test/Unit/Patch/SourceProviderTest.php +++ b/src/Test/Unit/Patch/SourceProviderTest.php @@ -51,7 +51,7 @@ class SourceProviderTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->filelist = $this->createMock(FileList::class); $this->directoryList = $this->createMock(DirectoryList::class); diff --git a/src/Test/Unit/Patch/Status/LocalResolverTest.php b/src/Test/Unit/Patch/Status/LocalResolverTest.php index cf0c8247..3dabaa71 100644 --- a/src/Test/Unit/Patch/Status/LocalResolverTest.php +++ b/src/Test/Unit/Patch/Status/LocalResolverTest.php @@ -47,7 +47,7 @@ class LocalResolverTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->filesystem = $this->createMock(Filesystem::class); $this->applier = $this->createMock(Applier::class); diff --git a/src/Test/Unit/Patch/Status/OptionalResolverTest.php b/src/Test/Unit/Patch/Status/OptionalResolverTest.php index 9789bd29..a8902b47 100644 --- a/src/Test/Unit/Patch/Status/OptionalResolverTest.php +++ b/src/Test/Unit/Patch/Status/OptionalResolverTest.php @@ -54,7 +54,7 @@ class OptionalResolverTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->filesystem = $this->createMock(Filesystem::class); $this->applier = $this->createMock(Applier::class); diff --git a/src/Test/Unit/Shell/Command/PatchDriverTest.php b/src/Test/Unit/Shell/Command/PatchDriverTest.php index d1462d54..02ac4ae5 100644 --- a/src/Test/Unit/Shell/Command/PatchDriverTest.php +++ b/src/Test/Unit/Shell/Command/PatchDriverTest.php @@ -34,7 +34,7 @@ class PatchDriverTest extends TestCase /** * @inheritDoc */ - protected function setUp() + protected function setUp(): void { $this->baseDir = dirname(__DIR__, 5) . '/tests/unit/'; $this->cwd = $this->baseDir . 'var/'; @@ -58,7 +58,7 @@ function (array $cmd, string $input = null) { /** * @inheritDoc */ - protected function tearDown() + protected function tearDown(): void { foreach (glob($this->cwd . '*') as $file) { if (is_file($file)) {