]> source.dussan.org Git - nextcloud-server.git/commitdiff
Assert that there are no xml error left
authorThomas Müller <thomas.mueller@tmit.eu>
Thu, 17 Dec 2015 16:15:04 +0000 (17:15 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Thu, 17 Dec 2015 16:18:42 +0000 (17:18 +0100)
tests/lib/testcase.php

index 5d88fa08a6dce84839c81b6d080bb6eb0e9d3bc4..c2a72beffcd1cd97cad75f29de436de294149ca5 100644 (file)
@@ -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));