static::
assertEquals($errorCode,
$caughtException->
getErrorCode());
static::
assertEquals($message,
$caughtException->
getMessage());
} /**
* @return array<string, array{exception: ShopwareHttpException|NewsletterException, statusCode: int, errorCode: string, message: string}>
*/
public static function exceptionDataProvider(): iterable
{ if (!Feature::
isActive('v6.6.0.0'
)) { yield NewsletterException::NEWSLETTER_RECIPIENT_NOT_FOUND_CODE =>
[ 'exception' => NewsletterException::
recipientNotFound('id-1', 'value-1'
),
'statusCode' => Response::HTTP_INTERNAL_SERVER_ERROR,
'errorCode' => NewsletterException::NEWSLETTER_RECIPIENT_NOT_FOUND_CODE,
'message' => 'The NewsletterRecipient with the identifier "id-1" - value-1 was not found.',
];
} else { yield NewsletterException::NEWSLETTER_RECIPIENT_NOT_FOUND_CODE =>
[ 'exception' => NewsletterException::
recipientNotFound('id-1', 'value-1'
),
'statusCode' => Response::HTTP_BAD_REQUEST,
'errorCode' => NewsletterException::NEWSLETTER_RECIPIENT_NOT_FOUND_CODE,
'message' => 'The NewsletterRecipient with the identifier "id-1" - value-1 was not found.',
];
}