You are here

protected function IntegrationTestBase::getAdminPath in Search API Autocomplete 8

Returns the path of an admin page.

Parameters

string|null $page: (optional) Either "edit" or "delete" to get the path of the respective search form, or NULL for the index's "Autocomplete" tab.

string|null $search_id: (optional) The ID of the search to link to, if a page is specified. NULL to use the default search used by this test.

Return value

string The internal path to the specified page.

3 calls to IntegrationTestBase::getAdminPath()
PagesIntegrationTest::checkAutocompleteFunctionality in tests/src/FunctionalJavascript/PagesIntegrationTest.php
Checks that autocomplete works correctly.
PagesIntegrationTest::checkSearchPluginCacheClear in tests/src/FunctionalJavascript/PagesIntegrationTest.php
Tests whether the search plugin cache is cleared correctly.
PagesIntegrationTest::enableSearch in tests/src/FunctionalJavascript/PagesIntegrationTest.php
Enables the search.
1 method overrides IntegrationTestBase::getAdminPath()
IntegrationTest::getAdminPath in tests/src/FunctionalJavascript/IntegrationTest.php
Returns the path of an admin page.

File

tests/src/FunctionalJavascript/IntegrationTestBase.php, line 89

Class

IntegrationTestBase
Provides a base class for integration tests of this module.

Namespace

Drupal\Tests\search_api_autocomplete\FunctionalJavascript

Code

protected function getAdminPath($page = NULL, $search_id = NULL) {
  $path = 'admin/config/search/search-api/index/autocomplete_search_index/autocomplete';
  if ($page !== NULL) {
    if ($search_id === NULL) {
      $search_id = $this->searchId;
    }
    $path .= "/{$search_id}/{$page}";
  }
  return $path;
}