aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fabpot-yaml/test/fixtures/sfCompact.yml
blob: 6bb4b84cb25cf29b7a27a66ef6f187d1b123b397 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- %YAML:1.0
test: Compact notation
brief: |
    Compact notation for sets of mappings with single element
yaml: | 
  ---
  # products purchased
  - item    : Super Hoop
  - item    : Basketball
    quantity: 1
  - item: 
      name: Big Shoes
      nick: Biggies
    quantity: 1
php: | 
  array (
    array (
      'item' => 'Super Hoop',
    ),
    array (
      'item' => 'Basketball',
      'quantity' => 1,
    ),
    array (
      'item' => array(
        'name' => 'Big Shoes',
        'nick' => 'Biggies'
      ),
      'quantity' => 1
    )
  )
---
test: Compact notation combined with inline notation
brief: |
    Combinations of compact and inline notation are allowed
yaml: |
  ---
  items:
    - { item: Super Hoop, quantity: 1 }
    - [ Basketball, Big Shoes ]
php: |
  array (
    'items' => array (
      array (
        'item' => 'Super Hoop',
        'quantity' => 1,
      ),
      array (
        'Basketball',
        'Big Shoes'
      )
    )
  )