8fefa494cfb20bdbf3e712adcb4c500a70ad7708
[yaffs-website] / vendor / symfony / yaml / Tests / Fixtures / YtsTypeTransfers.yml
1 --- %YAML:1.0
2 test: Strings
3 brief: >
4     Any group of characters beginning with an
5     alphabetic or numeric character is a string,
6     unless it belongs to one of the groups below
7     (such as an Integer or Time).
8 yaml: |
9     String
10 php: |
11     'String'
12 ---
13 test: String characters
14 brief: >
15     A string can contain any alphabetic or
16     numeric character, along with many
17     punctuation characters, including the
18     period, dash, space, quotes, exclamation, and
19     question mark.
20 yaml: |
21     - What's Yaml?
22     - It's for writing data structures in plain text.
23     - And?
24     - And what? That's not good enough for you?
25     - No, I mean, "And what about Yaml?"
26     - Oh, oh yeah. Uh.. Yaml for Ruby.
27 php: |
28     array(
29       "What's Yaml?",
30       "It's for writing data structures in plain text.",
31       "And?",
32       "And what? That's not good enough for you?",
33       "No, I mean, \"And what about Yaml?\"",
34       "Oh, oh yeah. Uh.. Yaml for Ruby."
35     )
36 ---
37 test: Indicators in Strings
38 brief: >
39     Be careful using indicators in strings.  In particular,
40     the comma, colon, and pound sign must be used carefully.
41 yaml: |
42     the colon followed by space is an indicator: but is a string:right here
43     same for the pound sign: here we have it#in a string
44     the comma can, honestly, be used in most cases: [ but not in, inline collections ]
45 php: |
46     array(
47       'the colon followed by space is an indicator' => 'but is a string:right here',
48       'same for the pound sign' => 'here we have it#in a string',
49       'the comma can, honestly, be used in most cases' => array('but not in', 'inline collections')
50     )
51 ---
52 test: Forcing Strings
53 brief: >
54     Any YAML type can be forced into a string using the
55     explicit !str method.
56 yaml: |
57     date string: !str 2001-08-01
58     number string: !str 192
59 php: |
60     array(
61       'date string' => '2001-08-01',
62       'number string' => '192'
63     )
64 ---
65 test: Single-quoted Strings
66 brief: >
67     You can also enclose your strings within single quotes,
68     which allows use of slashes, colons, and other indicators
69     freely.  Inside single quotes, you can represent a single
70     quote in your string by using two single quotes next to
71     each other.
72 yaml: |
73     all my favorite symbols: '#:!/%.)'
74     a few i hate: '&(*'
75     why do i hate them?: 'it''s very hard to explain'
76     entities: '£ me'
77 php: |
78     array(
79       'all my favorite symbols' => '#:!/%.)',
80       'a few i hate' => '&(*',
81       'why do i hate them?' => 'it\'s very hard to explain',
82       'entities' => '£ me'
83     )
84 ---
85 test: Double-quoted Strings
86 brief: >
87     Enclosing strings in double quotes allows you
88     to use escapings to represent ASCII and
89     Unicode characters.
90 yaml: |
91     i know where i want my line breaks: "one here\nand another here\n"
92 php: |
93     array(
94       'i know where i want my line breaks' => "one here\nand another here\n"
95     )
96 ---
97 test: Multi-line Quoted Strings
98 todo: true
99 brief: >
100     Both single- and double-quoted strings may be
101     carried on to new lines in your YAML document.
102     They must be indented a step and indentation
103     is interpreted as a single space.
104 yaml: |
105     i want a long string: "so i'm going to
106       let it go on and on to other lines
107       until i end it with a quote."
108 php: |
109     array('i want a long string' => "so i'm going to ".
110          "let it go on and on to other lines ".
111          "until i end it with a quote."
112     )
113
114 ---
115 test: Plain scalars
116 todo: true
117 brief: >
118     Unquoted strings may also span multiple lines, if they
119     are free of YAML space indicators and indented.
120 yaml: |
121     - My little toe is broken in two places;
122     - I'm crazy to have skied this way;
123     - I'm not the craziest he's seen, since there was always the German guy
124       who skied for 3 hours on a broken shin bone (just below the kneecap);
125     - Nevertheless, second place is respectable, and he doesn't
126       recommend going for the record;
127     - He's going to put my foot in plaster for a month;
128     - This would impair my skiing ability somewhat for the
129       duration, as can be imagined.
130 php: |
131     array(
132       "My little toe is broken in two places;",
133       "I'm crazy to have skied this way;",
134       "I'm not the craziest he's seen, since there was always ".
135          "the German guy who skied for 3 hours on a broken shin ".
136          "bone (just below the kneecap);",
137       "Nevertheless, second place is respectable, and he doesn't ".
138          "recommend going for the record;",
139       "He's going to put my foot in plaster for a month;",
140       "This would impair my skiing ability somewhat for the duration, ".
141          "as can be imagined."
142     )
143 ---
144 test: 'Null'
145 brief: >
146     You can use the tilde '~' character for a null value.
147 yaml: |
148     name: Mr. Show
149     hosted by: Bob and David
150     date of next season: ~
151 php: |
152     array(
153       'name' => 'Mr. Show',
154       'hosted by' => 'Bob and David',
155       'date of next season' => null
156     )
157 ---
158 test: Boolean
159 brief: >
160     You can use 'true' and 'false' for Boolean values.
161 yaml: |
162     Is Gus a Liar?: true
163     Do I rely on Gus for Sustenance?: false
164 php: |
165     array(
166       'Is Gus a Liar?' => true,
167       'Do I rely on Gus for Sustenance?' => false
168     )
169 ---
170 test: Integers
171 dump_skip: true
172 brief: >
173     An integer is a series of numbers, optionally
174     starting with a positive or negative sign.  Integers
175     may also contain commas for readability.
176 yaml: |
177     zero: 0
178     simple: 12
179 php: |
180     array(
181       'zero' => 0,
182       'simple' => 12,
183     )
184 ---
185 test: Positive Big Integer
186 deprecated: true
187 dump_skip: true
188 brief: >
189     An integer is a series of numbers, optionally
190     starting with a positive or negative sign.  Integers
191     may also contain commas for readability.
192 yaml: |
193     one-thousand: 1,000
194 php: |
195     array(
196       'one-thousand' => 1000.0,
197     )
198 ---
199 test: Negative Big Integer
200 deprecated: true
201 dump_skip: true
202 brief: >
203     An integer is a series of numbers, optionally
204     starting with a positive or negative sign.  Integers
205     may also contain commas for readability.
206 yaml: |
207     negative one-thousand: -1,000
208 php: |
209     array(
210       'negative one-thousand' => -1000.0
211     )
212 ---
213 test: Integers as Map Keys
214 brief: >
215     An integer can be used a dictionary key.
216 yaml: |
217     1: one
218     2: two
219     3: three
220 php: |
221     array(
222         1 => 'one',
223         2 => 'two',
224         3 => 'three'
225     )
226 ---
227 test: Floats
228 dump_skip: true
229 brief: >
230      Floats are represented by numbers with decimals,
231      allowing for scientific notation, as well as
232      positive and negative infinity and "not a number."
233 yaml: |
234      a simple float: 2.00
235      scientific notation: 1.00009e+3
236 php: |
237      array(
238        'a simple float' => 2.0,
239        'scientific notation' => 1000.09
240      )
241 ---
242 test: Larger Float
243 dump_skip: true
244 deprecated: true
245 brief: >
246      Floats are represented by numbers with decimals,
247      allowing for scientific notation, as well as
248      positive and negative infinity and "not a number."
249 yaml: |
250      larger float: 1,000.09
251 php: |
252      array(
253        'larger float' => 1000.09,
254      )
255 ---
256 test: Time
257 todo: true
258 brief: >
259     You can represent timestamps by using
260     ISO8601 format, or a variation which
261     allows spaces between the date, time and
262     time zone.
263 yaml: |
264     iso8601: 2001-12-14t21:59:43.10-05:00
265     space separated: 2001-12-14 21:59:43.10 -05:00
266 php: |
267     array(
268       'iso8601' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ),
269       'space separated' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" )
270     )
271 ---
272 test: Date
273 todo: true
274 brief: >
275     A date can be represented by its year,
276     month and day in ISO8601 order.
277 yaml: |
278     1976-07-31
279 php: |
280     date( 1976, 7, 31 )