You are here

protected function OgAccessTestBase::addCache in Organic groups 8

Mocks the cache methods.

3 calls to OgAccessTestBase::addCache()
OgAccessEntityTestBase::setUp in tests/src/Unit/OgAccessEntityTestBase.php
OgAccessTestBase::groupEntity in tests/src/Unit/OgAccessTestBase.php
Returns a mocked test group.
OgAccessTestBase::setUp in tests/src/Unit/OgAccessTestBase.php

File

tests/src/Unit/OgAccessTestBase.php, line 241

Class

OgAccessTestBase
Base class for tests of the OgAccess class.

Namespace

Drupal\Tests\og\Unit

Code

protected function addCache($prophecy) {
  $prophecy
    ->getCacheContexts()
    ->willReturn([]);
  $prophecy
    ->getCacheTags()
    ->willReturn([]);
  $prophecy
    ->getCacheMaxAge()
    ->willReturn(0);
  return $prophecy;
}