You are here

protected function TestPluginTrait::getReturnValue in Search API 8

Retrieves the value to return for a certain method.

Parameters

string $method: The name of the called method.

mixed $default: (optional) The default return value.

Return value

mixed The value to return from the method.

10 calls to TestPluginTrait::getReturnValue()
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::isAvailable in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Returns a boolean with the availability of the backend.
TestBackend::onDependencyRemoval in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Informs the plugin that some of its dependencies are being removed.
TestBackend::postUpdate in tests/search_api_test/src/Plugin/search_api/backend/TestBackend.php
Notifies the backend that its configuration was updated.
TestDatasource::getItemLanguage in tests/search_api_test/src/Plugin/search_api/datasource/TestDatasource.php
Retrieves the item's language.

... See full list

File

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

Class

TestPluginTrait
Provides common functionality for test plugins.

Namespace

Drupal\search_api_test

Code

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