function SerializeResponseTest::testSerialize

Tests that big_pipe responses can be serialized.

Throws

\Exception

File

core/modules/big_pipe/tests/src/Kernel/SerializeResponseTest.php, line 28

Class

SerializeResponseTest
Tests that big_pipe responses can be serialized.

Namespace

Drupal\Tests\big_pipe\Kernel

Code

public function testSerialize() : void {
    $response = new BigPipeResponse(new HtmlResponse());
    $this->assertIsString(serialize($response));
    // Checks that the response can be serialized after the big_pipe service is injected.
    $response->setBigPipeService($this->container
        ->get('big_pipe'));
    $this->assertIsString(serialize($response));
}

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