YtsBlockMapping.yml 919 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ---
  2. test: One Element Mapping
  3. brief: |
  4. A mapping with one key/value pair
  5. yaml: |
  6. foo: bar
  7. php: |
  8. array('foo' => 'bar')
  9. ---
  10. test: Multi Element Mapping
  11. brief: |
  12. More than one key/value pair
  13. yaml: |
  14. red: baron
  15. white: walls
  16. blue: berries
  17. php: |
  18. array(
  19. 'red' => 'baron',
  20. 'white' => 'walls',
  21. 'blue' => 'berries',
  22. )
  23. ---
  24. test: Values aligned
  25. brief: |
  26. Often times human editors of documents will align the values even
  27. though YAML emitters generally don't.
  28. yaml: |
  29. red: baron
  30. white: walls
  31. blue: berries
  32. php: |
  33. array(
  34. 'red' => 'baron',
  35. 'white' => 'walls',
  36. 'blue' => 'berries',
  37. )
  38. ---
  39. test: Colons aligned
  40. brief: |
  41. Spaces can come before the ': ' key/value separator.
  42. yaml: |
  43. red : baron
  44. white : walls
  45. blue : berries
  46. php: |
  47. array(
  48. 'red' => 'baron',
  49. 'white' => 'walls',
  50. 'blue' => 'berries',
  51. )