Skip to content

Commit 3fec662

Browse files
committed
add test fixture
1 parent 91a72dc commit 3fec662

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/ComposerProcessor/RaiseToInstalledComposerProcessor/RaiseToInstalledComposerProcessorTest.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,35 @@ public function testSkipSuggestChange(string $file, string $changedFileContent):
102102
$this->assertSame($changedFileContent, $changedPackageVersionsResult->getComposerJsonContents());
103103
}
104104

105+
public function testSkipConflictChange(): void
106+
{
107+
$composerJsonContents = FileSystem::read(__DIR__ . '/Fixture/skip-conflict.json');
108+
109+
$changedPackageVersionsResult = $this->raiseToInstalledComposerProcessor->process($composerJsonContents);
110+
111+
$changedPackageVersion = $changedPackageVersionsResult->getChangedPackageVersions()[0];
112+
113+
$this->assertSame('illuminate/container', $changedPackageVersion->getPackageName());
114+
$this->assertSame('^9.0', $changedPackageVersion->getOldVersion());
115+
$this->assertSame('^12.19', $changedPackageVersion->getNewVersion());
116+
117+
$this->assertSame(
118+
<<<'JSON'
119+
{
120+
"require-dev": {
121+
"illuminate/container": "^12.19"
122+
},
123+
"conflict": {
124+
"illuminate/container": "<9.0"
125+
}
126+
}
127+
128+
JSON
129+
,
130+
$changedPackageVersionsResult->getComposerJsonContents()
131+
);
132+
}
133+
105134
public function testSinglePiped(): void
106135
{
107136
$composerJsonContents = FileSystem::read(__DIR__ . '/Fixture/single-piped.json');

0 commit comments

Comments
 (0)