diff --git a/src/Tests/HooksTest.php b/src/Tests/HooksTest.php index 5ec28a5..fe643f3 100644 --- a/src/Tests/HooksTest.php +++ b/src/Tests/HooksTest.php @@ -92,6 +92,9 @@ class HooksTest extends WebTestBase { // hook_search_api_data_type_info_alter was triggered. $this->drupalGet($this->getIndexPath('fields')); $this->assertText('Peace/Dolphin dance'); + // The implementation of hook_search_api_field_type_mapping_alter has + // removed all dates, so we can't see any timestamp anymore in the page. + $this->assertNoText('timestamp'); $this->drupalGet('search-api-test-fulltext'); // hook_search_api_query_alter was triggered. diff --git a/tests/search_api_test_hooks/search_api_test_hooks.module b/tests/search_api_test_hooks/search_api_test_hooks.module index 82c3cbf..9323893 100644 --- a/tests/search_api_test_hooks/search_api_test_hooks.module +++ b/tests/search_api_test_hooks/search_api_test_hooks.module @@ -2,11 +2,7 @@ /** * @file - * * Test all the hooks defined by search api. - * - * The texts in all of these are titles off the 'Shades Of Blue: Madlib Invades - * Blue Note' album by Madlib. */ /** @@ -80,3 +76,11 @@ function search_api_test_hooks_search_api_data_type_info_alter(array &$data_type $data_type_definitions['text']['label'] = 'Peace/Dolphin dance'; } } + +/** + * Implements hook_search_api_field_type_mapping_alter. + */ +function search_api_test_hooks_search_api_field_type_mapping_alter(array &$mapping) { + $mapping['datetime_iso8601'] = NULL; + $mapping['timestamp'] = NULL; +}