We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d04026 commit 789c97eCopy full SHA for 789c97e
tests/Constraints/CoerciveTest.php
@@ -130,7 +130,20 @@ public function dataCoerceCases()
130
'string', 'integer', 42, true
131
);
132
133
- $tests = array();
+ // #46 check coercion with "const"
134
+ $tests[] = array(
135
+ '{"properties":{"propertyOne":{"type":"string","const":"42"}}}',
136
+ '{"propertyOne":42}',
137
+ 'integer', 'string', "42", true
138
+ );
139
+
140
141
142
+ '{"properties":{"propertyOne":{"type":"number","const":42}}}',
143
+ '{"propertyOne":"42"}',
144
+ 'string', 'integer', 42, true
145
146
147
foreach ($types as $toType => $testCases) {
148
foreach ($testCases as $testCase) {
149
$tests[] = array(
0 commit comments