sfTests.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. --- %YAML:1.0
  2. test: Multiple quoted string on one line
  3. brief: >
  4. Multiple quoted string on one line
  5. yaml: |
  6. stripped_title: { name: "foo bar", help: "bar foo" }
  7. php: |
  8. ['stripped_title' => ['name' => 'foo bar', 'help' => 'bar foo']]
  9. ---
  10. test: Empty sequence
  11. yaml: |
  12. foo: [ ]
  13. php: |
  14. ['foo' => []]
  15. ---
  16. test: Empty value
  17. yaml: |
  18. foo:
  19. php: |
  20. ['foo' => null]
  21. ---
  22. test: Inline string parsing
  23. brief: >
  24. Inline string parsing
  25. yaml: |
  26. test: ['complex: string', 'another [string]']
  27. php: |
  28. ['test' => ['complex: string', 'another [string]']]
  29. ---
  30. test: Boolean
  31. brief: >
  32. Boolean
  33. yaml: |
  34. - false
  35. - true
  36. - null
  37. - ~
  38. - 'false'
  39. - 'true'
  40. - 'null'
  41. - '~'
  42. php: |
  43. [
  44. false,
  45. true,
  46. null,
  47. null,
  48. 'false',
  49. 'true',
  50. 'null',
  51. '~',
  52. ]
  53. ---
  54. test: Empty lines in literal blocks
  55. brief: >
  56. Empty lines in literal blocks
  57. yaml: |
  58. foo:
  59. bar: |
  60. foo
  61. bar
  62. php: |
  63. ['foo' => ['bar' => "foo\n\n\n \nbar\n"]]
  64. ---
  65. test: Empty lines in folded blocks
  66. brief: >
  67. Empty lines in folded blocks
  68. yaml: |
  69. foo:
  70. bar: >
  71. foo
  72. bar
  73. php: |
  74. ['foo' => ['bar' => "\nfoo\n\nbar\n"]]
  75. ---
  76. test: IP addresses
  77. brief: >
  78. IP addresses
  79. yaml: |
  80. foo: 10.0.0.2
  81. php: |
  82. ['foo' => '10.0.0.2']
  83. ---
  84. test: A sequence with an embedded mapping
  85. brief: >
  86. A sequence with an embedded mapping
  87. yaml: |
  88. - foo
  89. - bar: { bar: foo }
  90. php: |
  91. ['foo', ['bar' => ['bar' => 'foo']]]
  92. ---
  93. test: Octal
  94. brief: as in spec example 2.19, octal value is converted
  95. yaml: |
  96. foo: 0123
  97. php: |
  98. ['foo' => 83]
  99. ---
  100. test: Octal strings
  101. brief: Octal notation in a string must remain a string
  102. yaml: |
  103. foo: "0123"
  104. php: |
  105. ['foo' => '0123']
  106. ---
  107. test: Octal strings
  108. brief: Octal notation in a string must remain a string
  109. yaml: |
  110. foo: '0123'
  111. php: |
  112. ['foo' => '0123']
  113. ---
  114. test: Octal strings
  115. brief: Octal notation in a string must remain a string
  116. yaml: |
  117. foo: |
  118. 0123
  119. php: |
  120. ['foo' => "0123\n"]
  121. ---
  122. test: Document as a simple hash
  123. brief: Document as a simple hash
  124. yaml: |
  125. { foo: bar }
  126. php: |
  127. ['foo' => 'bar']
  128. ---
  129. test: Document as a simple array
  130. brief: Document as a simple array
  131. yaml: |
  132. [ foo, bar ]
  133. php: |
  134. ['foo', 'bar']