You are here

public function DatabaseMockStorage::setDefault in Apigee Edge 8

1 call to DatabaseMockStorage::setDefault()
DatabaseMockStorage::reset in tests/modules/apigee_mock_api_client/src/DatabaseMockStorage.php

File

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

Class

DatabaseMockStorage
A mock storage for functional tests.

Namespace

Drupal\apigee_mock_api_client

Code

public function setDefault($default = NULL) : MockStorageInterface {

  // Make sure the default result is serializable.
  $default = $default instanceof MessageInterface ? new SerializableMessageWrapper($default) : $default;
  $this->state
    ->set(static::STATE_DEFAULT_RESULT_ID, $default);
  return $this;
}