You are here

public function OgGroupContextCacheContextTest::testWithoutContext in Organic groups 8

Tests getting cache context when there is no matching group on the route.

@covers ::getContext

Overrides OgContextCacheContextTestBase::testWithoutContext

File

tests/src/Unit/Cache/Context/OgGroupContextCacheContextTest.php, line 22

Class

OgGroupContextCacheContextTest
Tests the OG group context cache context.

Namespace

Drupal\Tests\og\Unit\Cache\Context

Code

public function testWithoutContext() {
  $this
    ->expectGroupContext();
  $result = $this
    ->getContextResult();
  $this
    ->assertEquals(OgGroupContextCacheContext::NO_CONTEXT, $result);
}