diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php index 4e9d465..4495cc8 100644 --- a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php +++ b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php @@ -98,7 +98,7 @@ function testSearchModuleSettingsPage() { $this->assertNoText(t('Extra type settings')); $this->assertNoText(t('Boost method')); - $this->clickLink(t('Add new search settings')); + $this->clickLink(t('Add new search type')); // Ensure that the test module is listed as an option $this->assertLinkByHref('admin/config/search/settings/add/search_extra_type_search'); @@ -134,53 +134,53 @@ function testSearchModuleSettingsPage() { * Verify that you can disable individual search modules. */ function testSearchModuleDisabling() { - // Array of search modules to test: 'path' is the search path, 'title' is + // Array of search plugins to test: 'path' is the search path, 'title' is // the tab title, 'keys' are the keywords to search for, and 'text' is // the text to assert is on the results page. - $module_info = array( - 'node' => array( + $plugin_info = array( + 'node_search' => array( 'path' => 'node', 'title' => 'Content', 'keys' => 'pizza', 'text' => $this->search_node->label(), ), - 'user' => array( + 'user_search' => array( 'path' => 'user', 'title' => 'User', 'keys' => $this->search_user->getUsername(), 'text' => $this->search_user->getEmail(), ), - 'search_extra_type' => array( + 'dummy_search_type' => array( 'path' => 'dummy_path', 'title' => 'Dummy search type', 'keys' => 'foo', 'text' => 'Dummy search snippet to display', ), ); - $modules = array_keys($module_info); + $search_plugins = array_keys($plugin_info); // Test each module if it's enabled as the only search module. - foreach ($modules as $module) { + foreach ($search_plugins as $id) { // Enable the one module and disable other ones. - $edit = array('default_type' => $module); + $edit = array('default_type' => $id); $this->drupalPost('admin/config/search/settings', $edit, t('Save configuration')); - foreach ($modules as $other) { - if ($other != $module) { + foreach ($search_plugins as $other) { + if ($other != $id) { $this->drupalGet('admin/config/search/settings/manage/' . $other . '/disable'); } } // Run a search from the correct search URL. - $info = $module_info[$module]; + $info = $plugin_info[$id]; $this->drupalGet('search/' . $info['path'] . '/' . $info['keys']); $this->assertNoText('no results', $info['title'] . ' search found results'); $this->assertText($info['text'], 'Correct search text found'); // Verify that other module search tab titles are not visible. - foreach ($modules as $other) { - if ($other != $module) { - $title = $module_info[$other]['title']; + foreach ($search_plugins as $other) { + if ($other != $id) { + $title = $plugin_info[$other]['title']; $this->assertNoText($title, $title . ' search tab is not shown'); } } @@ -213,8 +213,8 @@ function testSearchModuleDisabling() { foreach (array('search/node/pizza', 'search/node') as $path) { $this->drupalGet($path); - foreach ($modules as $module) { - $title = $module_info[$module]['title']; + foreach ($search_plugins as $id) { + $title = $plugin_info[$id]['title']; $this->assertText($title, format_string('%title search tab is shown', array('%title' => $title))); } }