Skip to content

Commit

Permalink
tests added to bugfix: patternProperties raised errors when the patte…
Browse files Browse the repository at this point in the history
…rn contained slash.
  • Loading branch information
ribeiropaulor committed Oct 26, 2015
1 parent 2dac5ac commit 1f62a72
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions tests/JsonSchema/Tests/Constraints/PatternPropertiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,29 @@ public function getValidTests()
),
'someotherobject' => array(
'foobar' => 1234,
),
'/products' => array(
'get' => array()
),
'#products' => array(
'get' => array()
),
'+products' => array(
'get' => array()
),
'~products' => array(
'get' => array()
),
'*products' => array(
'get' => array()
),
'%products' => array(
'get' => array()
)
)),
json_encode(array(
'type' => 'object',
'additionalProperties' => false,
'patternProperties' => array(
'^someobject$' => array(
'type' => 'object',
Expand All @@ -100,6 +119,42 @@ public function getValidTests()
'foobar' => array('type' => 'number'),
),
),
'^/' => array(
'type' => 'object',
'properties' => array(
'get' => array('type' => 'array')
)
),
'^#' => array(
'type' => 'object',
'properties' => array(
'get' => array('type' => 'array')
)
),
'^\+' => array(
'type' => 'object',
'properties' => array(
'get' => array('type' => 'array')
)
),
'^~' => array(
'type' => 'object',
'properties' => array(
'get' => array('type' => 'array')
)
),
'^\*' => array(
'type' => 'object',
'properties' => array(
'get' => array('type' => 'array')
)
),
'^%' => array(
'type' => 'object',
'properties' => array(
'get' => array('type' => 'array')
)
)
)
))
),
Expand Down

0 comments on commit 1f62a72

Please sign in to comment.