123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php
- namespace JsonSchema\Tests;
- class ExtendsTest extends BaseTestCase
- {
- public function getInvalidTests()
- {
- return array(
- array(
- '{
- "name":"bruno",
- "age":50
- }',
- '{
- "id": "person",
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "age" : {
- "type": "integer",
- "maximum":120
- }
- },
- "extends": {
- "id": "oldPerson",
- "type": "object",
- "properties": {
- "age" : {"minimum":70}
- }
- }
- }'
- ),
- array(
- '{
- "name":"bruno",
- "age":180
- }',
- '{
- "id": "person",
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "age" : {
- "type": "integer",
- "maximum":120
- }
- },
- "extends": {
- "id": "oldPerson",
- "type": "object",
- "properties": {
- "age" : {"minimum":70}
- }
- }
- }'
- )
- );
- }
- public function getValidTests()
- {
- return array(
- array(
- '{
- "name":"bruno",
- "age":80
- }',
- '{
- "id": "person",
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "age" : {
- "type": "integer",
- "maximum":120
- }
- },
- "extends": {
- "id": "oldPerson",
- "type": "object",
- "properties": {
- "age" : {"minimum":70}
- }
- }
- }'
- )
- );
- }
- }
|