Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function testGetErrorMessageShouldReturnErrorMessage(): void
*
* @return void
*/
#[\PHPUnit\Framework\Attributes\DataProvider('missedPhpConfigConditionsDataProvider')]
public function testNormalizeShouldSkipConfigCoppingWhenConditionFalse(
bool $isSprykerPackageInstalled,
bool $isCsFixerExecutableFound,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ModuleRatingResponseMapperTest extends TestCase
*
* @return void
*/
#[\PHPUnit\Framework\Attributes\DataProvider('invalidResponseDataProvider')]
public function testMapToModulesRatingResponseDtoShouldReturnExceptionWhenInvalidResponse(string $responseBody): void
{
//Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Binary file added tests/_data/archive.zip
Binary file not shown.
Loading