Mirosław Filip 346b3218dd Bump json-schema/JSON-Schema-Test-Suite to 1.2.0. Add data set
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
2016-05-09 23:42:42 +02:00

74 lines
1.8 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 NotTest extends BaseTestCase
{
public function getInvalidTests()
{
return array(
array(
'{
"x": [1, 2]
}',
'{
"properties": {
"x": {
"not": {
"type": "array",
"items": {"type": "integer"},
"minItems": 2
}
}
}
}'
)
);
}
public function getValidTests()
{
return array(
array(
'{
"x": [1]
}',
'{
"properties": {
"x": {
"not": {
"type": "array",
"items": {"type": "integer"},
"minItems": 2
}
}
}
}'
),
array(
'{
"x": ["foo", 2]
}',
'{
"properties": {
"x": {
"not": {
"type": "array",
"items": {"type": "integer"},
"minItems": 2
}
}
}
}'
)
);
}
}