File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 44
55use WendellAdriel \ValidatedDTO \Casting \ArrayCast ;
66
7- it ('properly casts from json strign to array ' )
7+ it ('properly casts from json string to array ' )
88 ->expect (fn () => new ArrayCast ())
99 ->cast (test_property (), '{"name": "John Doe", "email": "john.doe@example.com"} ' )
1010 ->toBe (['name ' => 'John Doe ' , 'email ' => 'john.doe@example.com ' ]);
Original file line number Diff line number Diff line change 1313 $ castable = new DTOCast (ValidatedDTOInstance::class);
1414
1515 expect ($ castable )->cast (test_property (), '{"name": "John Doe", "age": 30} ' )
16- ->toBeInstanceOf (ValidatedDTO::class);
17-
18- expect ($ castable )->cast (test_property (), '{"name": "John Doe", "age": 30} ' )
16+ ->toBeInstanceOf (ValidatedDTO::class)
17+ ->and ($ castable )->cast (test_property (), '{"name": "John Doe", "age": 30} ' )
1918 ->toArray ()
20- ->toBe (['name ' => 'John Doe ' , 'age ' => 30 ]);
21-
22- expect ($ castable )->cast (test_property (), ['name ' => 'John Doe ' , 'age ' => 30 ])
23- ->toBeInstanceOf (ValidatedDTO::class);
24-
25- expect ($ castable )->cast (test_property (), ['name ' => 'John Doe ' , 'age ' => 30 ])
19+ ->toBe (['name ' => 'John Doe ' , 'age ' => 30 ])
20+ ->and ($ castable )->cast (test_property (), ['name ' => 'John Doe ' , 'age ' => 30 ])
21+ ->toBeInstanceOf (ValidatedDTO::class)
22+ ->and ($ castable )->cast (test_property (), ['name ' => 'John Doe ' , 'age ' => 30 ])
2623 ->toArray ()
2724 ->toEqual (['name ' => 'John Doe ' , 'age ' => 30 ]);
2825
You can’t perform that action at this time.
0 commit comments