ReadOnlyTest.php 837 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace JsonSchema\Tests;
  3. class ReadOnlyTest extends BaseTestCase
  4. {
  5. public function getInvalidTests()
  6. {
  7. //is readonly really required?
  8. return array(
  9. array(
  10. '{ "number": [] }',
  11. '{
  12. "type":"object",
  13. "properties":{
  14. "number":{"type":"string","readonly":true}
  15. }
  16. }'
  17. )
  18. );
  19. }
  20. public function getValidTests()
  21. {
  22. return array(
  23. array(
  24. '{
  25. "number": "1.4"
  26. }',
  27. '{
  28. "type":"object",
  29. "properties":{
  30. "number":{"type":"string","readonly":true}
  31. }
  32. }'
  33. )
  34. );
  35. }
  36. }