function ChainRequestPolicyTest::testEmptyChain

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php \Drupal\Tests\Core\PageCache\ChainRequestPolicyTest::testEmptyChain()
  2. 8.9.x core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php \Drupal\Tests\Core\PageCache\ChainRequestPolicyTest::testEmptyChain()
  3. 10 core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php \Drupal\Tests\Core\PageCache\ChainRequestPolicyTest::testEmptyChain()

Asserts that check() returns NULL if the chain is empty.

@covers ::check

File

core/tests/Drupal/Tests/Core/PageCache/ChainRequestPolicyTest.php, line 47

Class

ChainRequestPolicyTest
@coversDefaultClass \Drupal\Core\PageCache\ChainRequestPolicy @group PageCache

Namespace

Drupal\Tests\Core\PageCache

Code

public function testEmptyChain() : void {
    $result = $this->policy
        ->check($this->request);
    $this->assertNull($result);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.