#[Package('system-settings')]
class UserExceptionTest extends TestCase
{ /**
* @dataProvider exceptionDataProvider
*/
public function testItThrowsException(ShopwareHttpException|CountryException
$exception, int
$statusCode, string
$errorCode, string
$message): void
{ try { throw $exception;
} catch (ShopwareHttpException|CountryException
$customerException) { $caughtException =
$customerException;
} static::
assertEquals($statusCode,
$caughtException->
getStatusCode());
static::
assertEquals($errorCode,
$caughtException->
getErrorCode());
static::
assertEquals($message,
$caughtException->
getMessage());
} /**
* @return array<string, array{exception: ShopwareHttpException|CountryException, statusCode: int, errorCode: string, message: string}>
*/