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 { $repoManagerMock->
method('getLocalRepository'
)->
willReturn(new InstalledArrayRepository());
} $composer =
$this->
createMock(Composer::
class);
$composer->
method('getRepositoryManager'
)->
willReturn($repoManagerMock);
if ($coreComposerName) { $composer->
expects(static::
never())->
method('getPackage'
);
} else {