diff --git a/composer.json b/composer.json index c087ff43..fd0cc97b 100644 --- a/composer.json +++ b/composer.json @@ -9,21 +9,20 @@ "ext-json": "*", "ext-simplexml": "*", "composer-plugin-api": "^2.0.0", - "aws/aws-sdk-php": "^3.257", - "composer/composer": "^2.6.0", + "aws/aws-sdk-php": "^3.368.0", + "composer/composer": "^2.9", "czproject/git-php": "^4.1", - "guzzlehttp/guzzle": "^7.4", - "nikic/php-parser": "^5.3.0", - "sebastian/diff": "^5.0.0 || ^6.0.0", + "guzzlehttp/guzzle": "^7.7", + "nikic/php-parser": "^5.7.0", "spryker-sdk/utils": "^0.2.2", - "symfony/console": "^6.0", - "symfony/finder": "^6.0", - "symfony/process": "^6.0" + "symfony/console": "^6.4", + "symfony/finder": "^6.4", + "symfony/process": "^6.4" }, "require-dev": { "ext-zip": "*", "phpstan/phpstan": "^1.0.0", - "phpunit/phpunit": "^10.5.0 || ^11.4.0", + "phpunit/phpunit": "^10.5.0 || ^11.4.0 || ^12.1.0", "spryker-sdk/manifest-test-data-provider": "dev-master", "spryker/code-sniffer": "^0.17.19", "symfony/filesystem": "^6.0" diff --git a/tests/SprykerSdkTest/Integrator/Builder/ConfigurationEnvironmentBuilder/StringConfigurationEnvironmentStrategyTest.php b/tests/SprykerSdkTest/Integrator/Builder/ConfigurationEnvironmentBuilder/StringConfigurationEnvironmentStrategyTest.php index 1e15acbd..2dc2e7a7 100644 --- a/tests/SprykerSdkTest/Integrator/Builder/ConfigurationEnvironmentBuilder/StringConfigurationEnvironmentStrategyTest.php +++ b/tests/SprykerSdkTest/Integrator/Builder/ConfigurationEnvironmentBuilder/StringConfigurationEnvironmentStrategyTest.php @@ -49,6 +49,7 @@ public static function isApplicableDataProvider(): Generator * * @return void */ + #[\PHPUnit\Framework\Attributes\DataProvider('isApplicableDataProvider')] public function testIsApplicable(bool $expRes, $value): void { $this->assertSame($expRes, $this->strategy->isApplicable($value)); @@ -71,6 +72,7 @@ public static function getFormattedExpressionDataProvider(): Generator * * @return void */ + #[\PHPUnit\Framework\Attributes\DataProvider('getFormattedExpressionDataProvider')] public function testGetFormattedExpression(string $expRes, string $value): void { $this->assertSame($expRes, $this->strategy->getFormattedExpression($value)); diff --git a/tests/SprykerSdkTest/Integrator/Builder/FileNormalizer/CodeSnifferCompositeNormalizerTest.php b/tests/SprykerSdkTest/Integrator/Builder/FileNormalizer/CodeSnifferCompositeNormalizerTest.php index 318e7cc0..c853fa07 100644 --- a/tests/SprykerSdkTest/Integrator/Builder/FileNormalizer/CodeSnifferCompositeNormalizerTest.php +++ b/tests/SprykerSdkTest/Integrator/Builder/FileNormalizer/CodeSnifferCompositeNormalizerTest.php @@ -91,6 +91,7 @@ public function testGetErrorMessageShouldReturnErrorMessage(): void * * @return void */ + #[\PHPUnit\Framework\Attributes\DataProvider('missedPhpConfigConditionsDataProvider')] public function testNormalizeShouldSkipConfigCoppingWhenConditionFalse( bool $isSprykerPackageInstalled, bool $isCsFixerExecutableFound, diff --git a/tests/SprykerSdkTest/Integrator/Communication/ReleaseApp/ModuleRatingResponseMapperTest.php b/tests/SprykerSdkTest/Integrator/Communication/ReleaseApp/ModuleRatingResponseMapperTest.php index c4ad2f0c..f6c9a278 100644 --- a/tests/SprykerSdkTest/Integrator/Communication/ReleaseApp/ModuleRatingResponseMapperTest.php +++ b/tests/SprykerSdkTest/Integrator/Communication/ReleaseApp/ModuleRatingResponseMapperTest.php @@ -22,6 +22,7 @@ class ModuleRatingResponseMapperTest extends TestCase * * @return void */ + #[\PHPUnit\Framework\Attributes\DataProvider('invalidResponseDataProvider')] public function testMapToModulesRatingResponseDtoShouldReturnExceptionWhenInvalidResponse(string $responseBody): void { //Arrange diff --git a/tests/SprykerSdkTest/Integrator/Executor/ReleaseGroup/ReleaseGroupManifestExecutorTest.php b/tests/SprykerSdkTest/Integrator/Executor/ReleaseGroup/ReleaseGroupManifestExecutorTest.php index f780dc91..d17cbba3 100644 --- a/tests/SprykerSdkTest/Integrator/Executor/ReleaseGroup/ReleaseGroupManifestExecutorTest.php +++ b/tests/SprykerSdkTest/Integrator/Executor/ReleaseGroup/ReleaseGroupManifestExecutorTest.php @@ -40,11 +40,15 @@ public function testRunReleaseGroupManifestExecutionSuccess(): void $gitMock = $this->createMock(GitRepository::class); $gitMock->method('hasChanges')->willReturn(true); $gitMock->method('getCurrentBranchName')->willReturn('testBranch'); + $callCount = 0; $gitMock->expects($this->exactly(2))->method('getDiff') - ->will($this->onConsecutiveCalls( - $this->throwException(new GitException('', 128)), - 'diff', - )); + ->willReturnCallback(function () use (&$callCount) { + if (++$callCount === 1) { + throw new GitException('', 128); + } + + return 'diff'; + }); $executorMock = $this->createManifestExecutorMock(); $manifestExecutor = new DiffGenerator($reader, $fileStorageMock, $executorMock, $gitMock); @@ -76,11 +80,15 @@ public function testRunReleaseGroupManifestExecutionForHashSuccess(): void $gitMock->method('hasChanges')->willReturn(true); $gitMock->method('getCurrentBranchName')->willReturn('HEAD detached at'); $gitMock->expects($this->once())->method('getHeadHashCommit')->willReturn('testBranch'); + $callCount2 = 0; $gitMock->expects($this->exactly(2))->method('getDiff') - ->will($this->onConsecutiveCalls( - $this->throwException(new GitException('', 128)), - 'diff', - )); + ->willReturnCallback(function () use (&$callCount2) { + if (++$callCount2 === 1) { + throw new GitException('', 128); + } + + return 'diff'; + }); $executorMock = $this->createManifestExecutorMock(); $manifestExecutor = new DiffGenerator($reader, $fileStorageMock, $executorMock, $gitMock); diff --git a/tests/_data/archive.zip b/tests/_data/archive.zip new file mode 100644 index 00000000..fafc1e72 Binary files /dev/null and b/tests/_data/archive.zip differ