public function testMethodNotAllowed(): void
{ $exception = ApiException::
methodNotAllowed(['GET'
], 'Get only'
);
static::
assertInstanceOf(MethodNotAllowedHttpException::
class,
$exception);
static::
assertEquals('Get only',
$exception->
getMessage());
} public function testUnauthorized(): void
{ $exception = ApiException::
unauthorized('challenge', 'Message'
);
static::
assertInstanceOf(UnauthorizedHttpException::
class,
$exception);
static::
assertEquals('Message',
$exception->
getMessage());
} public function testNoEntityCloned(): void
{ $exception = ApiException::
noEntityCloned('order', '1234'
);
static::
assertInstanceOf(NoEntityClonedException::
class,
$exception);
static::
assertEquals('Could not clone entity order with id 1234.',
$exception->
getMessage());
}