Example #1
0
 public function test_can_serialize_to_json_with_numeric_check()
 {
     $json = $this->serializer->serialize(new JsonableEntity(), JSON_NUMERIC_CHECK);
     $this->assertJson($json);
     $this->assertEquals('{"id":"IDVALUE","name":"NAMEVALUE","numeric":1}', $json);
 }
Example #2
0
 public function test_can_serialize_to_array()
 {
     $array = $this->serializer->serialize(new JsonableEntity());
     $this->assertEquals('{"id":"IDVALUE","name":"NAMEVALUE"}', $array);
 }