use Shopware\Core\Framework\Plugin\Exception\PluginComposerJsonInvalidException;
/**
* @internal
*/
class PackageProviderTest extends TestCase
{ public function testGetPluginInformation(): void
{ $packageProvider =
$this->
createProvider();
$pluginPath = __DIR__ . '/_fixture/valid';
$package =
$packageProvider->
getPluginComposerPackage($pluginPath,
new NullIO());
static::
assertSame('test/test',
$package->
getName());
} public function testGetPluginInformationInvalidJson(): void
{ $packageProvider =
$this->
createProvider();
$pluginPath = __DIR__ . '/_fixture/invalid';
$this->
expectException(PluginComposerJsonInvalidException::
class);
$this->
expectExceptionMessage('name : The property name is required'
);