Phprest\Service\Hateoas\UtilTest::testJsonSerialize PHP Method

testJsonSerialize() public method

public testJsonSerialize ( )
    public function testJsonSerialize()
    {
        $request = $this->setRequestParameters('phprest', '2.4', 'application/json');
        $result = $this->serialize(['a' => 1, 'b' => 2], $request, new Response());
        $this->assertEquals('{"a":1,"b":2}', $result->getContent());
    }