source: spip-zone/_plugins_/yaml/trunk/vendor/symfony/yaml/Tests/Fixtures/sfCompact.yml @ 110467

Last change on this file since 110467 was 110467, checked in by eric@…, 16 months ago

Premiers tests de mise à jour.

  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
1--- %YAML:1.0
2test: Compact notation
3brief: |
4    Compact notation for sets of mappings with single element
5yaml: |
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
15php: |
16  array (
17    array (
18      'item' => 'Super Hoop',
19    ),
20    array (
21      'item' => 'Basketball',
22      'quantity' => 1,
23    ),
24    array (
25      'item' => array(
26        'name' => 'Big Shoes',
27        'nick' => 'Biggies'
28      ),
29      'quantity' => 1
30    )
31  )
32---
33test: Compact notation combined with inline notation
34brief: |
35    Combinations of compact and inline notation are allowed
36yaml: |
37  ---
38  items:
39    - { item: Super Hoop, quantity: 1 }
40    - [ Basketball, Big Shoes ]
41php: |
42  array (
43    'items' => array (
44      array (
45        'item' => 'Super Hoop',
46        'quantity' => 1,
47      ),
48      array (
49        'Basketball',
50        'Big Shoes'
51      )
52    )
53  )
54--- %YAML:1.0
55test: Compact notation
56brief: |
57    Compact notation for sets of mappings with single element
58yaml: |
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
68php: |
69  array (
70    array (
71      'item' => 'Super Hoop',
72    ),
73    array (
74      'item' => 'Basketball',
75      'quantity' => 1,
76    ),
77    array (
78      'item' => array(
79        'name' => 'Big Shoes',
80        'nick' => 'Biggies'
81      ),
82      'quantity' => 1
83    )
84  )
85---
86test: Compact notation combined with inline notation
87brief: |
88    Combinations of compact and inline notation are allowed
89yaml: |
90  ---
91  items:
92    - { item: Super Hoop, quantity: 1 }
93    - [ Basketball, Big Shoes ]
94php: |
95  array (
96    'items' => array (
97      array (
98        'item' => 'Super Hoop',
99        'quantity' => 1,
100      ),
101      array (
102        'Basketball',
103        'Big Shoes'
104      )
105    )
106  )
107--- %YAML:1.0
108test: Compact notation
109brief: |
110    Compact notation for sets of mappings with single element
111yaml: |
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
121php: |
122  array (
123    array (
124      'item' => 'Super Hoop',
125    ),
126    array (
127      'item' => 'Basketball',
128      'quantity' => 1,
129    ),
130    array (
131      'item' => array(
132        'name' => 'Big Shoes',
133        'nick' => 'Biggies'
134      ),
135      'quantity' => 1
136    )
137  )
138---
139test: Compact notation combined with inline notation
140brief: |
141    Combinations of compact and inline notation are allowed
142yaml: |
143  ---
144  items:
145    - { item: Super Hoop, quantity: 1 }
146    - [ Basketball, Big Shoes ]
147php: |
148  array (
149    'items' => array (
150      array (
151        'item' => 'Super Hoop',
152        'quantity' => 1,
153      ),
154      array (
155        'Basketball',
156        'Big Shoes'
157      )
158    )
159  )
Note: See TracBrowser for help on using the repository browser.