sfTests.yml

drupal/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml

File

drupal/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml
View source
  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. - true
  36. - null
  37. - ~
  38. - 'false'
  39. - 'true'
  40. - 'null'
  41. - '~'
  42. php: |
  43. array(
  44. false,
  45. true,
  46. null,
  47. null,
  48. 'false',
  49. 'true',
  50. 'null',
  51. '~',
  52. )
  53. ---
  54. test: Empty lines in folded blocks
  55. brief: >
  56. Empty lines in folded blocks
  57. yaml: |
  58. foo:
  59. bar: |
  60. foo
  61. bar
  62. php: |
  63. array('foo' => array('bar' => "foo\n\n\n \nbar\n"))
  64. ---
  65. test: IP addresses
  66. brief: >
  67. IP addresses
  68. yaml: |
  69. foo: 10.0.0.2
  70. php: |
  71. array('foo' => '10.0.0.2')
  72. ---
  73. test: A sequence with an embedded mapping
  74. brief: >
  75. A sequence with an embedded mapping
  76. yaml: |
  77. - foo
  78. - bar: { bar: foo }
  79. php: |
  80. array('foo', array('bar' => array('bar' => 'foo')))
  81. ---
  82. test: A sequence with an unordered array
  83. brief: >
  84. A sequence with an unordered array
  85. yaml: |
  86. 1: foo
  87. 0: bar
  88. php: |
  89. array(1 => 'foo', 0 => 'bar')
  90. ---
  91. test: Octal
  92. brief: as in spec example 2.19, octal value is converted
  93. yaml: |
  94. foo: 0123
  95. php: |
  96. array('foo' => 83)
  97. ---
  98. test: Octal strings
  99. brief: Octal notation in a string must remain a string
  100. yaml: |
  101. foo: "0123"
  102. php: |
  103. array('foo' => '0123')
  104. ---
  105. test: Octal strings
  106. brief: Octal notation in a string must remain a string
  107. yaml: |
  108. foo: '0123'
  109. php: |
  110. array('foo' => '0123')
  111. ---
  112. test: Octal strings
  113. brief: Octal notation in a string must remain a string
  114. yaml: |
  115. foo: |
  116. 0123
  117. php: |
  118. array('foo' => "0123\n")
  119. ---
  120. test: Document as a simple hash
  121. brief: Document as a simple hash
  122. yaml: |
  123. { foo: bar }
  124. php: |
  125. array('foo' => 'bar')
  126. ---
  127. test: Document as a simple array
  128. brief: Document as a simple array
  129. yaml: |
  130. [ foo, bar ]
  131. php: |
  132. array('foo', 'bar')