コード例 #1
0
ファイル: JsonSerializerTest.php プロジェクト: Devitek/orm
 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);
 }
コード例 #2
0
ファイル: JsonSerializerTest.php プロジェクト: ryan-senn/orm
 public function test_can_serialize_to_array()
 {
     $array = $this->serializer->serialize(new JsonableEntity());
     $this->assertEquals('{"id":"IDVALUE","name":"NAMEVALUE"}', $array);
 }