sfCompact.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. --- %YAML:1.0
  2. test: Compact notation
  3. brief: |
  4. Compact notation for sets of mappings with single element
  5. yaml: |
  6. ---
  7. # products purchased
  8. - item : Super Hoop
  9. - item : Basketball
  10. quantity: 1
  11. - item:
  12. name: Big Shoes
  13. nick: Biggies
  14. quantity: 1
  15. php: |
  16. [
  17. [
  18. 'item' => 'Super Hoop',
  19. ],
  20. [
  21. 'item' => 'Basketball',
  22. 'quantity' => 1,
  23. ],
  24. [
  25. 'item' => [
  26. 'name' => 'Big Shoes',
  27. 'nick' => 'Biggies'
  28. ],
  29. 'quantity' => 1
  30. ]
  31. ]
  32. ---
  33. test: Compact notation combined with inline notation
  34. brief: |
  35. Combinations of compact and inline notation are allowed
  36. yaml: |
  37. ---
  38. items:
  39. - { item: Super Hoop, quantity: 1 }
  40. - [ Basketball, Big Shoes ]
  41. php: |
  42. [
  43. 'items' => [
  44. [
  45. 'item' => 'Super Hoop',
  46. 'quantity' => 1,
  47. ],
  48. [
  49. 'Basketball',
  50. 'Big Shoes'
  51. ]
  52. ]
  53. ]
  54. --- %YAML:1.0
  55. test: Compact notation
  56. brief: |
  57. Compact notation for sets of mappings with single element
  58. yaml: |
  59. ---
  60. # products purchased
  61. - item : Super Hoop
  62. - item : Basketball
  63. quantity: 1
  64. - item:
  65. name: Big Shoes
  66. nick: Biggies
  67. quantity: 1
  68. php: |
  69. [
  70. [
  71. 'item' => 'Super Hoop',
  72. ],
  73. [
  74. 'item' => 'Basketball',
  75. 'quantity' => 1,
  76. ],
  77. [
  78. 'item' => [
  79. 'name' => 'Big Shoes',
  80. 'nick' => 'Biggies'
  81. ],
  82. 'quantity' => 1
  83. ]
  84. ]
  85. ---
  86. test: Compact notation combined with inline notation
  87. brief: |
  88. Combinations of compact and inline notation are allowed
  89. yaml: |
  90. ---
  91. items:
  92. - { item: Super Hoop, quantity: 1 }
  93. - [ Basketball, Big Shoes ]
  94. php: |
  95. [
  96. 'items' => [
  97. [
  98. 'item' => 'Super Hoop',
  99. 'quantity' => 1,
  100. ],
  101. [
  102. 'Basketball',
  103. 'Big Shoes'
  104. ]
  105. ]
  106. ]
  107. --- %YAML:1.0
  108. test: Compact notation
  109. brief: |
  110. Compact notation for sets of mappings with single element
  111. yaml: |
  112. ---
  113. # products purchased
  114. - item : Super Hoop
  115. - item : Basketball
  116. quantity: 1
  117. - item:
  118. name: Big Shoes
  119. nick: Biggies
  120. quantity: 1
  121. php: |
  122. [
  123. [
  124. 'item' => 'Super Hoop',
  125. ],
  126. [
  127. 'item' => 'Basketball',
  128. 'quantity' => 1,
  129. ],
  130. [
  131. 'item' => [
  132. 'name' => 'Big Shoes',
  133. 'nick' => 'Biggies'
  134. ],
  135. 'quantity' => 1
  136. ]
  137. ]
  138. ---
  139. test: Compact notation combined with inline notation
  140. brief: |
  141. Combinations of compact and inline notation are allowed
  142. yaml: |
  143. ---
  144. items:
  145. - { item: Super Hoop, quantity: 1 }
  146. - [ Basketball, Big Shoes ]
  147. php: |
  148. [
  149. 'items' => [
  150. [
  151. 'item' => 'Super Hoop',
  152. 'quantity' => 1,
  153. ],
  154. [
  155. 'Basketball',
  156. 'Big Shoes'
  157. ]
  158. ]
  159. ]