Is it possible in phpunit to use a yaml file that contains configuration setting to be used in tests?
If so how as I cant see this in the documentation.
I am thinking that it might be possible to use such a file to contain useful data used throughout tests.
You can use yaml to initialize a database, or as the expected result for a database-related assert: http://www.phpunit.de/manual/3.7/en/database.html#understanding-datasets-and-datatables
I don’t believe there is any built in support for a yaml data provider, but if you have a parser that converts yaml to a flat array, you could easily write your own. http://www.phpunit.de/manual/3.7/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers