You are here

public function VocabularySerializationTest::testSerialization in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php \Drupal\Tests\taxonomy\Functional\VocabularySerializationTest::testSerialization()

File

core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php, line 40

Class

VocabularySerializationTest
Regression test for https://www.drupal.org/node/2807263.

Namespace

Drupal\Tests\taxonomy\Functional

Code

public function testSerialization() {
  $this
    ->drupalGet('/vocabulary_serialization_test/test');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSame('this is the output', $this
    ->getSession()
    ->getPage()
    ->getContent());
  $this
    ->assertSession()
    ->responseHeaderEquals('X-Drupal-Cache', 'MISS');
  $this
    ->drupalGet('/vocabulary_serialization_test/test');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSame('this is the output', $this
    ->getSession()
    ->getPage()
    ->getContent());
  $this
    ->assertSession()
    ->responseHeaderEquals('X-Drupal-Cache', 'HIT');
}