mirror of
https://github.com/justinrainbow/json-schema.git
synced 2025-05-01 12:08:02 +02:00
Tweaked tests for assoc array tests
This commit is contained in:
parent
9d8a082093
commit
dd5717a760
@ -9,8 +9,6 @@
|
||||
|
||||
namespace JsonSchema\Tests\Constraints;
|
||||
|
||||
use JsonSchema\Validator;
|
||||
|
||||
class AdditionalPropertiesTest extends BaseTestCase
|
||||
{
|
||||
public function getInvalidTests()
|
||||
@ -52,8 +50,7 @@ class AdditionalPropertiesTest extends BaseTestCase
|
||||
"prop":{"type":"string"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}',
|
||||
Validator::CHECK_MODE_TYPE_CAST
|
||||
}'
|
||||
),
|
||||
array(
|
||||
'{
|
||||
@ -79,8 +76,7 @@ class AdditionalPropertiesTest extends BaseTestCase
|
||||
"prop":{"type":"string"}
|
||||
},
|
||||
"additionalProperties": {"type":"string"}
|
||||
}',
|
||||
Validator::CHECK_MODE_TYPE_CAST
|
||||
}'
|
||||
),
|
||||
array(
|
||||
'{
|
||||
@ -132,8 +128,7 @@ class AdditionalPropertiesTest extends BaseTestCase
|
||||
"properties":{
|
||||
"prop":{"type":"string"}
|
||||
}
|
||||
}',
|
||||
Validator::CHECK_MODE_TYPE_CAST
|
||||
}'
|
||||
),
|
||||
array(
|
||||
'{
|
||||
|
@ -7,8 +7,6 @@
|
||||
*/
|
||||
namespace JsonSchema\Tests\Constraints;
|
||||
|
||||
use JsonSchema\Validator;
|
||||
|
||||
/**
|
||||
* Class OfPropertiesTest
|
||||
*/
|
||||
@ -71,7 +69,7 @@ class OfPropertiesTest extends BaseTestCase
|
||||
},
|
||||
"required": ["prop1"]
|
||||
}',
|
||||
Validator::CHECK_MODE_NORMAL,
|
||||
null,
|
||||
array(
|
||||
array(
|
||||
"property" => "prop2",
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
namespace JsonSchema\Tests\Constraints;
|
||||
|
||||
use JsonSchema\Constraints\Constraint;
|
||||
use JsonSchema\Constraints\UndefinedConstraint;
|
||||
|
||||
class RequiredPropertyTest extends BaseTestCase
|
||||
@ -229,7 +230,8 @@ class RequiredPropertyTest extends BaseTestCase
|
||||
"properties": {
|
||||
"array":{"type":"array", "required": true}
|
||||
}
|
||||
}'
|
||||
}',
|
||||
Constraint::CHECK_MODE_NORMAL
|
||||
),
|
||||
array(
|
||||
'{
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
namespace JsonSchema\Tests\Drafts;
|
||||
use JsonSchema\Constraints\Constraint;
|
||||
|
||||
/**
|
||||
* @package JsonSchema\Tests\Drafts
|
||||
@ -25,6 +26,28 @@ class Draft3Test extends BaseDraftTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function getInvalidForAssocTests()
|
||||
{
|
||||
$tests = parent::getInvalidForAssocTests();
|
||||
unset(
|
||||
$tests['type.json / object type matches objects / an array is not an object'],
|
||||
$tests['type.json / array type matches arrays / an object is not an array']
|
||||
);
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
public function getValidForAssocTests()
|
||||
{
|
||||
$tests = parent::getValidForAssocTests();
|
||||
unset(
|
||||
$tests['type.json / object type matches objects / an array is not an object'],
|
||||
$tests['type.json / array type matches arrays / an object is not an array']
|
||||
);
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
@ -25,6 +25,28 @@ class Draft4Test extends BaseDraftTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function getInvalidForAssocTests()
|
||||
{
|
||||
$tests = parent::getInvalidForAssocTests();
|
||||
unset(
|
||||
$tests['type.json / object type matches objects / an array is not an object'],
|
||||
$tests['type.json / array type matches arrays / an object is not an array']
|
||||
);
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
public function getValidForAssocTests()
|
||||
{
|
||||
$tests = parent::getValidForAssocTests();
|
||||
unset(
|
||||
$tests['type.json / object type matches objects / an array is not an object'],
|
||||
$tests['type.json / array type matches arrays / an object is not an array']
|
||||
);
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user