Skip to content

Commit 02c52d9

Browse files
committed
Add default value tests for assoc mode with no type casting
1 parent 13d0e34 commit 02c52d9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Constraints/DefaultPropertiesTest.php

+11
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,15 @@ public function testValidCasesUsingAssoc($input, $schema, $expectOutput = null)
124124
$factory = new Factory(null, null, Constraint::CHECK_MODE_TYPE_CAST | Constraint::CHECK_MODE_APPLY_DEFAULTS);
125125
self::testValidCases($input, $schema, $expectOutput, new Validator($factory));
126126
}
127+
128+
/**
129+
* @dataProvider getValidTests
130+
*/
131+
public function testValidCasesUsingAssocWithoutTypeCast($input, $schema, $expectOutput = null)
132+
{
133+
$input = json_decode($input, true);
134+
$factory = new Factory(null, null, Constraint::CHECK_MODE_APPLY_DEFAULTS);
135+
self::testValidCases($input, $schema, $expectOutput, new Validator($factory));
136+
137+
}
127138
}

0 commit comments

Comments
 (0)