123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace JsonSchema\Tests;
- class PatternTest extends BaseTestCase
- {
- public function getInvalidTests()
- {
- return array(
- array(
- '{
- "value":"Abacates"
- }',
- '{
- "type":"object",
- "properties":{
- "value":{"type":"string","pattern":"^cat"}
- },
- "additionalProperties":false
- }'
- )
- );
- }
- public function getValidTests()
- {
- return array(
- array(
- '{
- "value":"Abacates"
- }',
- '{
- "type":"object",
- "properties":{
- "value":{"type":"string","pattern":"tes$"}
- },
- "additionalProperties":false
- }'
- ),
- array(
- '{
- "value":"Abacates"
- }',
- '{
- "type":"object",
- "properties":{
- "value":{"type":"string","pattern":"cat"}
- },
- "additionalProperties":false
- }'
- )
- );
- }
- }
|