sfTests.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. array('stripped_title' => array('name' => 'foo bar', 'help' => 'bar foo'))
  9. ---
  10. test: Empty sequence
  11. yaml: |
  12. foo: [ ]
  13. php: |
  14. array('foo' => array())
  15. ---
  16. test: Empty value
  17. yaml: |
  18. foo:
  19. php: |
  20. array('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. array('test' => array('complex: string', 'another [string]'))
  29. ---
  30. test: Boolean
  31. brief: >
  32. Boolean
  33. yaml: |
  34. - false
  35. - -
  36. - off
  37. - no
  38. - true
  39. - +
  40. - on
  41. - yes
  42. - null
  43. - ~
  44. - 'false'
  45. - '-'
  46. - 'off'
  47. - 'no'
  48. - 'true'
  49. - '+'
  50. - 'on'
  51. - 'yes'
  52. - 'null'
  53. - '~'
  54. php: |
  55. array(
  56. false,
  57. false,
  58. false,
  59. false,
  60. true,
  61. true,
  62. true,
  63. true,
  64. null,
  65. null,
  66. 'false',
  67. '-',
  68. 'off',
  69. 'no',
  70. 'true',
  71. '+',
  72. 'on',
  73. 'yes',
  74. 'null',
  75. '~',
  76. )
  77. ---
  78. test: Empty lines in folded blocks
  79. brief: >
  80. Empty lines in folded blocks
  81. yaml: |
  82. foo:
  83. bar: |
  84. foo
  85. bar
  86. php: |
  87. array('foo' => array('bar' => "foo\n\n\n \nbar\n"))
  88. ---
  89. test: IP addresses
  90. brief: >
  91. IP addresses
  92. yaml: |
  93. foo: 10.0.0.2
  94. php: |
  95. array('foo' => '10.0.0.2')
  96. ---
  97. test: A sequence with an embedded mapping
  98. brief: >
  99. A sequence with an embedded mapping
  100. yaml: |
  101. - foo
  102. - bar: { bar: foo }
  103. php: |
  104. array('foo', array('bar' => array('bar' => 'foo')))
  105. ---
  106. test: A sequence with an unordered array
  107. brief: >
  108. A sequence with an unordered array
  109. yaml: |
  110. 1: foo
  111. 0: bar
  112. php: |
  113. array(1 => 'foo', 0 => 'bar')
  114. ---
  115. test: Octal
  116. brief: as in spec example 2.19, octal value is converted
  117. yaml: |
  118. foo: 0123
  119. php: |
  120. array('foo' => 83)
  121. ---
  122. test: Octal strings
  123. brief: Octal notation in a string must remain a string
  124. yaml: |
  125. foo: "0123"
  126. php: |
  127. array('foo' => '0123')
  128. ---
  129. test: Octal strings
  130. brief: Octal notation in a string must remain a string
  131. yaml: |
  132. foo: '0123'
  133. php: |
  134. array('foo' => '0123')
  135. ---
  136. test: Octal strings
  137. brief: Octal notation in a string must remain a string
  138. yaml: |
  139. foo: |
  140. 0123
  141. php: |
  142. array('foo' => "0123\n")