You are here

public function BlocacheMetadataUnitTest::testSetOverrides in Blocache (Block Cache Control) 8

@covers Drupal\blocache\BlocacheMetadata::setOverrides

File

tests/src/Unit/BlocacheMetadataUnitTest.php, line 87

Class

BlocacheMetadataUnitTest
Tests for BlocacheMetadata class.

Namespace

Drupal\Tests\blocache\Unit

Code

public function testSetOverrides() {
  $max_age = $this->metadata[BlocacheMetadata::METADATA_MAX_AGE];
  $contexts = $this->metadata[BlocacheMetadata::METADATA_CONTEXTS];
  $tags = $this->metadata[BlocacheMetadata::METADATA_TAGS];
  $this
    ->assertEquals(TRUE, $this->blocacheMetadata
    ->setOverrides($max_age, $contexts, $tags));
  $this
    ->assertEquals(TRUE, $this->blocacheMetadata
    ->isOverridden());
  $this
    ->assertEquals($this->metadata, $this->blocacheMetadata
    ->getOverrides());
}