MDL-32095 fix outputlib test to setup debug level properly

This commit is contained in:
Petr Skoda
2012-03-28 22:47:57 +02:00
parent e807c0be4f
commit b137739b5e
+14
View File
@@ -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();