/** * @test */ public function it_should_return_a_json_representation_of_itself() { $event = new Event('eventName', array('aData' => 'aValue')); $this->assertEquals(json_encode(array('name' => 'eventName', 'params' => array('aData' => 'aValue'))), $event->jsonSerialize()); }