You are here

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

@covers Drupal\blocache\BlocacheMetadata::unsetOverrides

File

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

Class

BlocacheMetadataUnitTest
Tests for BlocacheMetadata class.

Namespace

Drupal\Tests\blocache\Unit

Code

public function testUnsetOverrides() {
  $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
    ->unsetOverrides());
  $this
    ->assertEquals([], $this->blocacheMetadata
    ->getOverrides());
}