fromDelta example

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
    {
        return ExtensionNotFoundException::fromId($id);
    }

    public static function extensionNotFoundFromTechnicalName(string $technicalName): self
    {
        return ExtensionNotFoundException::fromTechnicalName($technicalName);
    }
}

class ExtensionUpdateRequiresConsentAffirmationExceptionTest extends TestCase
{
    /** * @DisabledFeatures(features={"v6.6.0.0"}) */
    public function testGetErrorCode(): void
    {
        static::assertSame(
            'FRAMEWORK__EXTENSION_UPDATE_REQUIRES_CONSENT_AFFIRMATION',
            ExtensionUpdateRequiresConsentAffirmationException::fromDelta('SwagApp', [])->getErrorCode()
        );
    }

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