aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fabpot-yaml/test/fixtures/sfCompact.yml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fabpot-yaml/test/fixtures/sfCompact.yml')
-rw-r--r--lib/fabpot-yaml/test/fixtures/sfCompact.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/fabpot-yaml/test/fixtures/sfCompact.yml b/lib/fabpot-yaml/test/fixtures/sfCompact.yml
new file mode 100644
index 0000000..6bb4b84
--- /dev/null
+++ b/lib/fabpot-yaml/test/fixtures/sfCompact.yml
@@ -0,0 +1,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'
+ )
+ )
+ )