You are here

protected function TestPluginTrait::getMethodOverride in Search API 8

Retrieves a possible override set for the given method.

Parameters

string $method: The name of the method.

Return value

callable|null The method override to use, or NULL if none was set.

19 calls to TestPluginTrait::getMethodOverride()
TestBackend::addIndex in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Adds a new index to this server.
TestBackend::deleteAllIndexItems in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Deletes all the items from the index.
TestBackend::deleteItems in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Deletes the specified items from the index.
TestBackend::getDiscouragedProcessors in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Limits the processors displayed in the UI for indexes on this server.
TestBackend::getSupportedFeatures in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Returns all features that this backend supports.

... See full list

File

tests/search_api_test/src/TestPluginTrait.php, line 85

Class

TestPluginTrait
Provides common functionality for test plugins.

Namespace

Drupal\search_api_test

Code

protected function getMethodOverride($method) {
  $type = $this
    ->getPluginType();
  $key = "search_api_test.{$type}.method.{$method}";
  return \Drupal::state()
    ->get($key);
}