You are here

public function DatabaseMockStorage::addMatchableResult in Apigee Edge 8

File

tests/modules/apigee_mock_api_client/src/DatabaseMockStorage.php, line 176

Class

DatabaseMockStorage
A mock storage for functional tests.

Namespace

Drupal\apigee_mock_api_client

Code

public function addMatchableResult(MatchableResultInterface $matchableResult) : MockStorageInterface {
  $matchers = $this->state
    ->get(static::STATE_MATCHABLE_RESULT_ID);
  $matchers = $matchers ?? [];
  $matchers[] = $matchableResult;
  $this->state
    ->set(static::STATE_MATCHABLE_RESULT_ID, $matchers);
  return $this;
}