Fix for YAML error from issue #8093 

I have problems setting up PHPUnit test environment at the moment, so any help with running the YAML tests would be appreciated.