예제 #1
0
 /**
  * @expectedException \Novuso\System\Exception\DomainException
  */
 public function test_that_deserialize_throws_exception_for_invalid_state()
 {
     $serializer = new JsonSerializer();
     $serializer->deserialize(json_encode(['firstName' => 'James', 'lastName' => 'Wood', 'username' => 'jwood', 'email' => '*****@*****.**', 'birthDate' => '1980-10-20']));
 }
예제 #2
0
 public function test_that_it_is_serializable()
 {
     $serializer = new JsonSerializer();
     $state = $serializer->serialize($this->message);
     /** @var EventMessage $message */
     $message = $serializer->deserialize($state);
     $this->assertTrue($message->equals($this->message));
 }