class EnvironmentRequirementsValidatorTest extends TestCase
{ /**
* @param array<string, string> $composerOverrides
* @param array<string, Link> $requires
* @param SystemCheck[] $expectedChecks
*
* @dataProvider composerRequirementsProvider
*/
public function testValidateRequirements(?string
$coreComposerName, array
$composerOverrides, array
$requires, array
$expectedChecks): void
{ $systemEnvironment =
new PlatformRepository([],
$composerOverrides);
$corePackage =
new RootPackage($coreComposerName ?? 'shopware/platform', '1.0.0', '1.0.0'
);
$corePackage->
setRequires($requires);
$repoManagerMock =
$this->
createMock(RepositoryManager::
class);
if ($coreComposerName) { $repoManagerMock->
method('getLocalRepository'
)->
willReturn( new InstalledArrayRepository([$corePackage]) );
} else {