$collection =
new ExtensionCollection();
$collection->
set('SwagApp',
(new ExtensionStruct())->
assign(['name' => 'SwagApp', 'label' => 'Label', 'version' => '1.0.0', 'active' => true, 'type' => 'app'
]));
$collection =
$this->extensionListingLoader->
load($collection,
$this->
createAdminStoreContext());
/** @var ExtensionStruct $extension */
$extension =
$collection->
get('SwagApp'
);
static::
assertSame('app',
$extension->
getType());
static::
assertSame('local',
$extension->
getSource());
static::
assertSame('Description',
$extension->
getDescription());
static::
assertSame('Short Description',
$extension->
getShortDescription());
static::
assertSame('2.0.0',
$extension->
getLatestVersion());
static::
assertCount(6,
$collection);
} private function getLicencesJson(): string
{ $json =
file_get_contents(__DIR__ . '/../_fixtures/responses/my-licenses.json'
);
static::
assertIsString($json, 'Could not read my-licenses.json file'
);
return $json;
}}