WrongMessagesFailingTestCaseTest.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace JsonSchema\Tests;
  3. class WrongMessagesFailingTestCaseTest extends BaseTestCase
  4. {
  5. public function getInvalidTests()
  6. {
  7. return array(
  8. array(
  9. '{
  10. "stringOrNumber":4.8,
  11. "booleanOrNull":["A","B"]
  12. }',
  13. '{
  14. "type":"object",
  15. "properties":{
  16. "stringOrNumber":{"type":["string","number"]},
  17. "booleanOrNull":{"type":["boolean","null"]}
  18. }
  19. }'
  20. )
  21. );
  22. }
  23. public function getValidTests()
  24. {
  25. return array(
  26. array(
  27. '{
  28. "stringOrNumber":4.8,
  29. "booleanOrNull":true
  30. }',
  31. '{
  32. "type":"object",
  33. "properties":{
  34. "stringOrNumber":{"type":["string","number"]},
  35. "booleanOrNull":{"type":["boolean","null"]}
  36. }
  37. }'
  38. )
  39. );
  40. }
  41. }