class PluginExceptionTest extends TestCase
{ public function testCannotDeleteManaged(): void
{ $e = PluginException::
cannotDeleteManaged('MyPlugin'
);
static::
assertEquals(PluginException::CANNOT_DELETE_COMPOSER_MANAGED,
$e->
getErrorCode());
} public function testCannotExtractNoSuchFile(): void
{ $e = PluginException::
cannotExtractNoSuchFile('/some/file/that/does/not/exist.zip'
);
static::
assertEquals(PluginException::CANNOT_EXTRACT_ZIP_FILE_DOES_NOT_EXIST,
$e->
getErrorCode());
} public function testCannotExtractInvalidZipFile(): void
{ $e = PluginException::
cannotExtractInvalidZipFile('/some/invalid.zip'
);
static::
assertEquals(PluginException::CANNOT_EXTRACT_ZIP_INVALID_ZIP,
$e->
getErrorCode());
}