/**
* @internal
*
* @covers \Shopware\Core\Framework\Api\ApiException
*/
#[Package('core')]
class ApiExceptionTest extends TestCase
{ public function testInvalidSyncCriteriaException(): void
{ $exception = ApiException::
invalidSyncCriteriaException('operationKey'
);
static::
assertEquals(ApiException::API_INVALID_SYNC_CRITERIA_EXCEPTION,
$exception->
getErrorCode());
static::
assertEquals('Sync operation operationKey, with action "delete", requires a criteria with at least one filter and can only be applied for mapping entities',
$exception->
getMessage());
} public function testInvalidSyncOperationException(): void
{ $exception = ApiException::
invalidSyncOperationException('message'
);
static::
assertEquals(ApiException::API_INVALID_SYNC_OPERATION_EXCEPTION,
$exception->
getErrorCode());
static::
assertEquals('message',
$exception->
getMessage());
}