sfCompact.yml (2901B)
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 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 --- 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 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 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 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 --- 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 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 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 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 --- 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 array ( 149 'items' => array ( 150 array ( 151 'item' => 'Super Hoop', 152 'quantity' => 1, 153 ), 154 array ( 155 'Basketball', 156 'Big Shoes' 157 ) 158 ) 159 )