You are here

protected function AuthcacheEnumKeysTestCase::assertStub in Authenticated User Page Caching (Authcache) 7.2

Test whether the given stub passes the invocation verifier.

3 calls to AuthcacheEnumKeysTestCase::assertStub()
AuthcacheEnumKeysTestCase::testCustomAnonymousKeys in modules/authcache_enum/lib/Drupal/authcache_enum/Tests/AuthcacheEnumKeysTestCase.php
Test anonymous key customization.
AuthcacheEnumKeysTestCase::testCustomAuthenticatedKeys in modules/authcache_enum/lib/Drupal/authcache_enum/Tests/AuthcacheEnumKeysTestCase.php
Test authenticated key customization.
AuthcacheEnumKeysTestCase::testDeprecatedCustomAuthenticatedKeys in modules/authcache_enum/lib/Drupal/authcache_enum/Tests/AuthcacheEnumKeysTestCase.php
Test deprecated authenticated key customization.

File

modules/authcache_enum/lib/Drupal/authcache_enum/Tests/AuthcacheEnumKeysTestCase.php, line 37
Defines a test case covering _authcache_enum_cartesian.

Class

AuthcacheEnumKeysTestCase
Unit tests for _authcache_enum_comb.

Namespace

Drupal\authcache_enum\Tests

Code

protected function assertStub(\HookStubProxy $stub, $verifier, $message = NULL) {
  $result = $stub
    ->verify($verifier, $error);
  if (!$message) {
    $message = t('Verify invocation of hook @hook.', array(
      '@hook' => $stub
        ->hookname(),
    ));
  }
  if (!$result && is_string($error)) {
    $message .= ' ' . $error;
  }
  $this
    ->assertTRUE($result, $message);
}