@@ -31,7 +31,7 @@ public function testValidCoerceCasesUsingAssoc($input, $schema)
31
31
32
32
$ value = json_decode ($ input , true );
33
33
34
- $ validator ->coerce ($ value , $ schema );
34
+ $ validator ->check ($ value , $ schema, array ( ' coerce-types ' => true ) );
35
35
$ this ->assertTrue ($ validator ->isValid (), print_r ($ validator ->getErrors (), true ));
36
36
}
37
37
@@ -52,7 +52,7 @@ public function testValidCoerceCases($input, $schema, $errors = array())
52
52
$ this ->assertTrue (gettype ($ value ->integer ) == "string " );
53
53
$ this ->assertTrue (gettype ($ value ->boolean ) == "string " );
54
54
55
- $ validator ->coerce ($ value , $ schema );
55
+ $ validator ->check ($ value , $ schema, array ( ' coerce-types ' => true ) );
56
56
57
57
$ this ->assertTrue (gettype ($ value ->number ) == "double " );
58
58
$ this ->assertTrue (gettype ($ value ->integer ) == "integer " );
@@ -88,7 +88,7 @@ public function testInvalidCoerceCases($input, $schema, $errors = array())
88
88
89
89
$ validator = new Validator (new Factory ($ schemaStorage , null , array ('checkMode ' => $ checkMode )));
90
90
$ value = json_decode ($ input );
91
- $ validator ->coerce ($ value , $ schema );
91
+ $ validator ->check ($ value , $ schema, array ( ' coerce-types ' => true ) );
92
92
93
93
if (array () !== $ errors ) {
94
94
$ this ->assertEquals ($ errors , $ validator ->getErrors (), print_r ($ validator ->getErrors (), true ));
@@ -108,7 +108,7 @@ public function testInvalidCoerceCasesUsingAssoc($input, $schema, $errors = arra
108
108
109
109
$ validator = new Validator (new Factory ($ schemaStorage , null , array ('checkMode ' => $ checkMode )));
110
110
$ value = json_decode ($ input , true );
111
- $ validator ->coerce ($ value , $ schema );
111
+ $ validator ->check ($ value , $ schema, array ( ' coerce-types ' => true ) );
112
112
113
113
if (array () !== $ errors ) {
114
114
$ this ->assertEquals ($ errors , $ validator ->getErrors (), print_r ($ validator ->getErrors (), true ));
0 commit comments