ExtensionInstallException example

'name' => $pluginName]
        );
    }

    public static function extensionThemeStillInUse(string $extensionId): self
    {
        return new ExtensionThemeStillInUseException($extensionId);
    }

    public static function extensionInstallException(string $message): self
    {
        return new ExtensionInstallException($message);
    }

    /** * @param array<string, array<string, mixed>> $deltas */
    public static function extensionUpdateRequiresConsentAffirmationException(string $appName, array $deltas): self
    {
        return ExtensionUpdateRequiresConsentAffirmationException::fromDelta($appName$deltas);
    }

    public static function extensionNotFoundFromId(string $id): self
    {

class ExtensionInstallExceptionTest extends TestCase
{
    /** * @DisabledFeatures(features={"v6.6.0.0"}) */
    public function testGetErrorCode(): void
    {
        static::assertSame(
            'FRAMEWORK__EXTENSION_INSTALL_EXCEPTION',
            (new ExtensionInstallException('Cannot find extension'))->getErrorCode()
        );
    }

    /** * @DisabledFeatures(features={"v6.6.0.0"}) */
    public function testGetStatusCode(): void
    {
        static::assertSame(
            Response::HTTP_INTERNAL_SERVER_ERROR,
            (new ExtensionInstallException('Cannot find extension'))->getStatusCode()
        );
Home | Imprint | This part of the site doesn't use cookies.