Skip to content

Commit

Permalink
MDL-44635 discard error logging during ajax tests
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Mar 17, 2014
1 parent 2d9a0b8 commit f56f0fc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/tests/ajaxlib_test.php
Expand Up @@ -26,6 +26,22 @@
defined('MOODLE_INTERNAL') || die();

class core_ajaxlib_testcase extends advanced_testcase {
/** @var string Original error log */
protected $oldlog;

protected function setUp() {
global $CFG;

parent::setUp();
// Discard error logs.
$this->oldlog = ini_get('error_log');
ini_set('error_log', "$CFG->dataroot/testlog.log");
}

protected function tearDown() {
ini_set('error_log', $this->oldlog);
parent::tearDown();
}

protected function helper_test_clean_output() {
$this->resetAfterTest();
Expand Down

0 comments on commit f56f0fc

Please sign in to comment.