/**
  * @dataProvider provideRoundTripObjects
  */
 public function testJsonRoundTrip(PageIdentifier $identifierObject)
 {
     $json = $identifierObject->jsonSerialize();
     $this->assertEquals($identifierObject, PageIdentifier::jsonDeserialize($json));
 }
Example #2
0
 /**
  * @param array $json
  *
  * @return self
  */
 public static function jsonDeserialize($json)
 {
     return new self($json['id'], $json['type'], $json['action'], $json['timestamp'], $json['user'], PageIdentifier::jsonDeserialize($json['pageidentifier']), $json['comment'], $json['details']);
 }