mirror of
https://github.com/justinrainbow/json-schema.git
synced 2025-05-02 20:42:13 +02:00
description for failing tests. Flatten directory structure Use "test.json / suite description / test case description" notation in data provider to allow a readable test output Skip Draft3Test / Draft4Test tests which are not passing Add some comment to skipped tests
52 lines
1.2 KiB
PHP
52 lines
1.2 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the JsonSchema package.
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace JsonSchema\Tests\Constraints;
|
|
|
|
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"]}
|
|
}
|
|
}'
|
|
)
|
|
);
|
|
}
|
|
}
|