You are here

public function OgMembershipStateCacheContextTest::contextProvider in Organic groups 8

Provides test data for the test with active context objects.

Return value

array An array of test data arrays, each array having two elements: 1. The test data that is used to set up the active context. 2. The cache context string that is expected to be returned by the cache context service being tested.

Overrides OgContextCacheContextTestBase::contextProvider

See also

::testWithContext()

File

tests/src/Unit/Cache/Context/OgMembershipStateCacheContextTest.php, line 108

Class

OgMembershipStateCacheContextTest
Tests OG membership state cache context.

Namespace

Drupal\Tests\og\Unit\Cache\Context

Code

public function contextProvider() {
  return [
    [
      FALSE,
      OgMembershipStateCacheContext::NO_CONTEXT,
    ],
    [
      OgMembershipInterface::STATE_ACTIVE,
      OgMembershipInterface::STATE_ACTIVE,
    ],
    [
      OgMembershipInterface::STATE_PENDING,
      OgMembershipInterface::STATE_PENDING,
    ],
    [
      OgMembershipInterface::STATE_BLOCKED,
      OgMembershipInterface::STATE_BLOCKED,
    ],
  ];
}