unindentedCollections.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. ['collection' => ['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. ['collection' => ['key' => ['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. ['collection' => ['key' => ['subkey' => ['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. ['collection' => ['key' => ['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. ['collection' => ['key' => ['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. ['collection' => [['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. ['collection' => [['key' => 'foo', 'foo' => 'bar']]]