function VocabularySerializationTest::testSerialization

Same name and namespace 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 <a href="https://www.drupal.org/node/2807263">https://www.drupal.org/node/2807263</a>.

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.