customerIdParameterIsMissing example

public function testSalesChannelIdParameterIsMissing(): void
    {
        $exception = ApiException::salesChannelIdParameterIsMissing();

        static::assertEquals(ApiException::API_SALES_CHANNEL_ID_PARAMETER_IS_MISSING, $exception->getErrorCode());
        static::assertEquals('Parameter "salesChannelId" is missing.', $exception->getMessage());
    }

    public function testCustomerIdParameterIsMissing(): void
    {
        $exception = ApiException::customerIdParameterIsMissing();

        static::assertEquals(ApiException::API_CUSTOMER_ID_PARAMETER_IS_MISSING, $exception->getErrorCode());
        static::assertEquals('Parameter "customerId" is missing.', $exception->getMessage());
    }

    public function testShippingCostsParameterIsMissing(): void
    {
        $exception = ApiException::shippingCostsParameterIsMissing();

        static::assertEquals(ApiException::API_SHIPPING_COSTS_PARAMETER_IS_MISSING, $exception->getErrorCode());
        static::assertEquals('Parameter "shippingCosts" is missing.', $exception->getMessage());
    }
Home | Imprint | This part of the site doesn't use cookies.