From b137739b5eb219999e68fac67ccc2b9fd62e366d Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 28 Mar 2012 22:47:57 +0200 Subject: [PATCH] MDL-32095 fix outputlib test to setup debug level properly --- lib/simpletest/testoutputlib.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/simpletest/testoutputlib.php b/lib/simpletest/testoutputlib.php index 49dcdf71e17..b6558ff3387 100644 --- a/lib/simpletest/testoutputlib.php +++ b/lib/simpletest/testoutputlib.php @@ -40,6 +40,7 @@ require_once($CFG->libdir . '/outputlib.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class xhtml_container_stack_test extends UnitTestCase { + protected $olddebug; public static $includecoverage = array('lib/outputlib.php'); protected function start_capture() { @@ -52,6 +53,19 @@ class xhtml_container_stack_test extends UnitTestCase { return $result; } + function setUp() { + global $CFG; + parent::setUp(); + $this->olddebug = $CFG->debug; + $CFG->debug = DEBUG_DEVELOPER; + } + + function tearDown() { + global $CFG; + $CFG->debug = $this->olddebug; + parent::tearDown(); + } + public function test_push_then_pop() { // Set up. $stack = new xhtml_container_stack();