--- /dev/null
+<?php
+
+/**
+ * @file
+ * Contains hook implementations for testing HAL module.
+ */
+
+/**
+ * Implements hook_hal_type_uri_alter().
+ */
+function hal_test_hal_type_uri_alter(&$uri, $context = []) {
+ if (!empty($context['hal_test'])) {
+ $uri = 'hal_test_type';
+ }
+}
+
+/**
+ * Implements hook_hal_relation_uri_alter().
+ */
+function hal_test_hal_relation_uri_alter(&$uri, $context = []) {
+ if (!empty($context['hal_test'])) {
+ $uri = 'hal_test_relation';
+ }
+}
+
+/**
+ * Implements hook_rest_type_uri_alter().
+ *
+ * @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetTypeUri().
+ */
+function hal_test_rest_type_uri_alter(&$uri, $context = []) {
+ if (!empty($context['rest_test'])) {
+ $uri = 'rest_test_type';
+ }
+}
+
+/**
+ * Implements hook_rest_relation_uri_alter().
+ *
+ * @deprecated Kept only for BC test coverage, see \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetRelationUri().
+ */
+function hal_test_rest_relation_uri_alter(&$uri, $context = []) {
+ if (!empty($context['rest_test'])) {
+ $uri = 'rest_test_relation';
+ }
+}