[Tests-only] Improve error message when XML is expected
[Tests-only] Improve error message when XML is expected

Whenever we expect an XML response, throw a more clear exception.
In case the body is malformed, embed it in the exception message to get
it in the test output.

owncloud/core,phil-davis/core,owncloud/core,owncloud/core,owncloud/core,owncloud/core