public function testMissingReverseAssociation(): void
{ $exception = ApiException::
missingReverseAssociation('order', 'customer'
);
static::
assertInstanceOf(MissingReverseAssociation::
class,
$exception);
} public function testUnsupportedMediaType(): void
{ $exception = ApiException::
unsupportedMediaType('jpeg'
);
static::
assertInstanceOf(UnsupportedMediaTypeHttpException::
class,
$exception);
static::
assertSame('The Content-Type "jpeg" is unsupported.',
$exception->
getMessage());
} public function testNotExistingRelation(): void
{ $exception = ApiException::
notExistingRelation('demo'
);
static::
assertEquals(ApiException::API_NOT_EXISTING_RELATION_EXCEPTION,
$exception->
getErrorCode());
static::
assertEquals('Resource at path "demo" is not an existing relation.',
$exception->
getMessage());
}