public function getExtensionDataProvider(): AbstractExtensionDataProvider&MockObject
{ $extension =
new ExtensionStruct();
$extension->
setName('TestApp'
);
$extension->
setActive(true
);
$extensionDataProvider =
$this->
createMock(AbstractExtensionDataProvider::
class);
$extensionDataProvider ->
method('getInstalledExtensions'
) ->
willReturn(new ExtensionCollection(['TestApp' =>
$extension]));
return $extensionDataProvider;
} public function getStoreClient(string
$file = __DIR__ . './../_fixtures/responses/extension-red.json'
): StoreClient&MockObject
{ $storeClient =
$this->
createMock(StoreClient::
class);
$storeClient->
method('getExtensionCompatibilities'
)->
willReturn(json_decode((string) file_get_contents($file), true, 512, \JSON_THROW_ON_ERROR
));
return $storeClient;
}}