protected function getYAML()
{
//the string below is a json string.
//since yaml 1.2, json is a valid subset o yaml.
//most yaml parsers should parse json just fine.
//heredoc syntax
$yaml = '{
"machines": [
{
"name": "yaml-machine",
"factory": "fully\\\\qualified\\\\factory-for-test-machine",
"description": "my test-machine description",
"states": [
{
"name": "a",
"type": "initial",
"entry_command": "",
"exit_command": null,
"entry_callable": null,
"exit_callable": null,
"description": "state a description"
},
{
"name": "b",
"type": "normal",
"entry_command": "izzum\\\\command\\\\NullCommand",
"exit_command": "izzum\\\\command\\\\NullCommand",
"entry_callable": "Static::method",
"exit_callable": "Static::method",
"description": "state b description"
},
{
"name": "done",
"type": "final",
"entry_command": "izzum\\\\command\\\\NullCommand",
"exit_command": "izzum\\\\command\\\\NullCommand",
"entry_callable": "Static::method",
"exit_callable": null,
"description": "state done description"
}
],
"transitions": [
{
"state_from": "a",
"state_to": "b",
"rule": "izzum\\\\rules\\\\TrueRule",
"command": "izzum\\\\command\\\\NullCommand",
"guard_callable": "Static::guard",
"transition_callable": "Static::method",
"event": "ab",
"description": "my description for a_to_b"
},
{
"state_from": "b",
"state_to": "done",
"rule": null,
"command": null,
"guard_callable": null,
"transition_callable": null,
"event": "bdone",
"description": "my description for b_to_done"
}
]
}
]
}';
return $yaml;
}