You are here

public function ChainResponsePolicyTest::testEmptyChain in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php \Drupal\Tests\Core\PageCache\ChainResponsePolicyTest::testEmptyChain()
  2. 10 core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php \Drupal\Tests\Core\PageCache\ChainResponsePolicyTest::testEmptyChain()

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

@covers ::check

File

core/tests/Drupal/Tests/Core/PageCache/ChainResponsePolicyTest.php, line 49

Class

ChainResponsePolicyTest
@coversDefaultClass \Drupal\Core\PageCache\ChainResponsePolicy @group PageCache

Namespace

Drupal\Tests\Core\PageCache

Code

public function testEmptyChain() {
  $result = $this->policy
    ->check($this->response, $this->request);
  $this
    ->assertSame(NULL, $result);
}