1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace JsonSchema\Tests;
- class UnionWithNullValueTest extends BaseTestCase
- {
- public function getInvalidTests()
- {
- return array(
- array(
- '{
- "stringOrNumber":null,
- "booleanOrNull":null
- }',
- '{
- "type":"object",
- "properties":{
- "stringOrNumber":{"type":["string","number"]},
- "booleanOrNull":{"type":["boolean","null"]}
- }
- }'
- )
- );
- }
- public function getValidTests()
- {
- return array(
- array(
- '{
- "stringOrNumber":12,
- "booleanOrNull":null
- }',
- '{
- "type":"object",
- "properties":{
- "stringOrNumber":{"type":["string","number"]},
- "booleanOrNull":{"type":["boolean","null"]}
- }
- }'
- )
- );
- }
- }
|