You are here

protected function PluginTestTrait::setReturnValue in Search API 8

Sets the return value for a certain method on a test plugin.

Parameters

string $plugin_type: The "short" plugin type.

string $method: The method name.

mixed $value: The value that should be returned.

8 calls to PluginTestTrait::setReturnValue()
DependencyRemovalTest::testBackendDependency in tests/src/Kernel/ConfigEntity/DependencyRemovalTest.php
Tests a backend with a dependency that gets removed.
DependencyRemovalTest::testDatasourceDependency in tests/src/Kernel/ConfigEntity/DependencyRemovalTest.php
Tests a datasource with a dependency that gets removed.
DependencyRemovalTest::testProcessorDependency in tests/src/Kernel/ConfigEntity/DependencyRemovalTest.php
Tests a processor with a dependency that gets removed.
DependencyRemovalTest::testTrackerDependency in tests/src/Kernel/ConfigEntity/DependencyRemovalTest.php
Tests a tracker with a dependency that gets removed.
IndexLoadItemsTest::testMissingItems in tests/src/Kernel/Index/IndexLoadItemsTest.php
Verifies that missing items are correctly detected and removed.

... See full list

File

tests/search_api_test/src/PluginTestTrait.php, line 38

Class

PluginTestTrait
Provides functionality for tests that deal with test plugins.

Namespace

Drupal\search_api_test

Code

protected function setReturnValue($plugin_type, $method, $value) {
  $key = "search_api_test.{$plugin_type}.return.{$method}";
  \Drupal::state()
    ->set($key, $value);
}