You are here

protected function AssetRefreshManagerTest::setupApiResponseStub in Media: Acquia DAM 8

Setups the API response stub.

Parameters

array $request_query_options: The list of request query options.

array $response: The stub of Notifications API response.

3 calls to AssetRefreshManagerTest::setupApiResponseStub()
AssetRefreshManagerTest::testInterruptedFetch in tests/src/Unit/AssetRefreshManagerTest.php
Tests an "interrupted API fetch (a result set exceeds the limit)" scenario.
AssetRefreshManagerTest::testNoMatchingMediaEntityIds in tests/src/Unit/AssetRefreshManagerTest.php
Tests a "no matching media entity ids are found" scenario.
AssetRefreshManagerTest::testNonInterruptedFetch in tests/src/Unit/AssetRefreshManagerTest.php
Tests a "non-interrupted API fetch" scenario.

File

tests/src/Unit/AssetRefreshManagerTest.php, line 510

Class

AssetRefreshManagerTest
AssetRefreshManager Service test.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

protected function setupApiResponseStub(array $request_query_options, array $response) {
  $this->acquiadamClient
    ->expects($this
    ->any())
    ->method('getNotifications')
    ->with($request_query_options)
    ->willReturn($response);
}