Issue #1986528 by Berdir: Fixed Fatal error: Call to undefined method PHPUnit_Framework_Warning::getInfo() when there is an error in tests.