public function testJsonSerialize() { $expectedJson = '{"whatever":true}'; $this->claims->expects($this->once())->method('jsonSerialize')->will($this->returnValue($expectedJson)); $this->assertSame($expectedJson, $this->payload->jsonSerialize()); }