File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,14 @@ public function benchSpec($params)
3030 $ options ->schemasCache = self ::$ schemas ;
3131
3232 $ schema = Schema::import ($ case ['schema ' ], $ options );
33-
34- $ options ->validateOnly = true ;
33+ // import with defaults applied
3534 $ schema ->in ($ case ['data ' ], $ options );
35+
36+ // default is not required to pass validation, so result might be invalid
37+ // for back-exporting defaults have to be disabled
38+ $ options ->applyDefaults = false ;
39+ $ imported = $ schema ->in ($ case ['data ' ], $ options );
40+ $ schema ->out ($ imported );
3641 } catch (InvalidValue $ exception ) {
3742 $ actualValid = false ;
3843 }
Original file line number Diff line number Diff line change @@ -30,9 +30,14 @@ public function benchSpec($params)
3030 $ options ->schemasCache = self ::$ schemas ;
3131
3232 $ schema = Schema::import ($ case ['schema ' ], $ options );
33-
34- $ options ->validateOnly = true ;
33+ // import with defaults applied
3534 $ schema ->in ($ case ['data ' ], $ options );
35+
36+ // default is not required to pass validation, so result might be invalid
37+ // for back-exporting defaults have to be disabled
38+ $ options ->applyDefaults = false ;
39+ $ imported = $ schema ->in ($ case ['data ' ], $ options );
40+ $ schema ->out ($ imported );
3641 } catch (InvalidValue $ exception ) {
3742 $ actualValid = false ;
3843 }
You can’t perform that action at this time.
0 commit comments