unindentedCollections.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --- %YAML:1.0
  2. test: Unindented collection
  3. brief: >
  4. Unindented collection
  5. yaml: |
  6. collection:
  7. - item1
  8. - item2
  9. - item3
  10. php: |
  11. array('collection' => array('item1', 'item2', 'item3'))
  12. ---
  13. test: Nested unindented collection (two levels)
  14. brief: >
  15. Nested unindented collection
  16. yaml: |
  17. collection:
  18. key:
  19. - a
  20. - b
  21. - c
  22. php: |
  23. array('collection' => array('key' => array('a', 'b', 'c')))
  24. ---
  25. test: Nested unindented collection (three levels)
  26. brief: >
  27. Nested unindented collection
  28. yaml: |
  29. collection:
  30. key:
  31. subkey:
  32. - one
  33. - two
  34. - three
  35. php: |
  36. array('collection' => array('key' => array('subkey' => array('one', 'two', 'three'))))
  37. ---
  38. test: Key/value after unindented collection (1)
  39. brief: >
  40. Key/value after unindented collection (1)
  41. yaml: |
  42. collection:
  43. key:
  44. - a
  45. - b
  46. - c
  47. foo: bar
  48. php: |
  49. array('collection' => array('key' => array('a', 'b', 'c')), 'foo' => 'bar')
  50. ---
  51. test: Key/value after unindented collection (at the same level)
  52. brief: >
  53. Key/value after unindented collection
  54. yaml: |
  55. collection:
  56. key:
  57. - a
  58. - b
  59. - c
  60. foo: bar
  61. php: |
  62. array('collection' => array('key' => array('a', 'b', 'c'), 'foo' => 'bar'))
  63. ---
  64. test: Shortcut Key after unindented collection
  65. brief: >
  66. Key/value after unindented collection
  67. yaml: |
  68. collection:
  69. - key: foo
  70. foo: bar
  71. php: |
  72. array('collection' => array(array('key' => 'foo', 'foo' => 'bar')))
  73. ---
  74. test: Shortcut Key after unindented collection with custom spaces
  75. brief: >
  76. Key/value after unindented collection
  77. yaml: |
  78. collection:
  79. - key: foo
  80. foo: bar
  81. php: |
  82. array('collection' => array(array('key' => 'foo', 'foo' => 'bar')))