Skip to content

Commit 05ede63

Browse files
committed
Add multiple-type test that requires coercion
1 parent de64d83 commit 05ede63

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Constraints/CoerciveTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ public function dataCoerceCases()
143143
'string', 'integer', 42, true, true
144144
);
145145

146+
// #45 check multiple types (none valid)
147+
$tests[] = array(
148+
'{"properties":{"propertyOne":{"type":["number", "boolean"]}}}',
149+
'{"propertyOne":"42"}',
150+
'string', 'integer', 42, true
151+
);
152+
146153
return $tests;
147154
}
148155

0 commit comments

Comments
 (0)