$this->extensionListingLoader =
$this->
getContainer()->
get(ExtensionListingLoader::
class);
} public function testServerNotReachable(): void
{ $this->
getRequestHandler()->
reset();
$this->
getRequestHandler()->
append(function D
): void
{ throw new ClientException('',
new Request('GET', ''
),
new Response(500,
[], ''
));
});
$collection =
new ExtensionCollection();
$collection->
set('myPlugin',
(new ExtensionStruct())->
assign(['name' => 'myPlugin', 'label' => 'Label', 'version' => '1.0.0'
]));
$collection =
$this->extensionListingLoader->
load($collection,
$this->
createAdminStoreContext());
static::
assertCount(1,
$collection);
} public function testExternalAreAdded(): void
{ $this->
getRequestHandler()->
reset();
$this->
getRequestHandler()->
append(new Response(200,
[], '{"data":[]}'
));
$this->
getRequestHandler()->
append(new Response(200,
[],
$this->
getLicencesJson()));