function VocabularySerializationTest::testSerialization

Same name in other branches
  1. 9 core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php \Drupal\Tests\taxonomy\Functional\VocabularySerializationTest::testSerialization()
  2. 10 core/modules/taxonomy/tests/src/Functional/VocabularySerializationTest.php \Drupal\Tests\taxonomy\Functional\VocabularySerializationTest::testSerialization()
  3. 11.x 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');
}

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