sfTests.yml 2.2 KB

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