I have now just committed YAML data sets to the Database Extension for PHPUnit. So now all those that love the simplicity and straightforwardness of YAML can use it with your data sets. I have also created a persistor for YAML datasets so you can easily convert existing data sets or database data into YAML representations.
This is really the first I have dealt with YAML and it is definitely a viable alternative for data sets. Here is what they will look like.
table1:
-
table1_id: 1
columnName1: "tgfahgasdf"
columnName2: 200
columnName3: 34.64
columnName4: yghkf;a hahfg8ja h;
table2:
-
table2_id: 1
column5: fhah
column6: 456
column7: 46.5
column8: "fsdb, ghfdas"
-
table2_id: 3
column5: ajsdlkfguitah
column6: 654
column7: blah
column8: |-
thesethasdl
asdflkjsadf asdfsadfhl "adsf, halsdf" sadfhlasdf
The biggest issue I had was figuring out how YAML dealt with trailing line breaks. It appears that '|-' did the trick. It will strip the final line break. Another thing to take note is that indention is important. It doesn't HAVE to be spaces (it can be tabs) it just needs to be consistent. The last thing is that strings do not need to be quoted, but if they are you can use escape characters (like \n.)
This was committed to the trunk of PHPUnit and I anticipate Sebastian will be merging it back into 3.4 shortly.