From: Thomas Müller Date: Thu, 17 Dec 2015 16:15:04 +0000 (+0100) Subject: Assert that there are no xml error left X-Git-Tag: v9.0beta1~463^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=26f416b9f53e646434da0308b6ff4254122d4db2;p=nextcloud-server.git Assert that there are no xml error left --- diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php index 5d88fa08a6d..c2a72beffcd 100644 --- a/tests/lib/testcase.php +++ b/tests/lib/testcase.php @@ -92,6 +92,12 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { throw $hookExceptions[0]; } + // fail hard if xml errors have not been cleaned up + $errors = libxml_get_errors(); + libxml_clear_errors(); + $this->assertEquals([], $errors); + + // tearDown the traits $traits = $this->getTestTraits(); foreach ($traits as $trait) { $methodName = 'tearDown' . basename(str_replace('\\', '/', $trait));