Skip to content

Commit

Permalink
Tests: restore error handler after Mantis core init
Browse files Browse the repository at this point in the history
We need to disable MantisBT's error handler to allow PHPUnit to convert
errors to exceptions, so we can capture and test them.

Fixes #21696
  • Loading branch information
dregad committed Sep 29, 2016
1 parent fb35359 commit 7e43fcb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/TestConfig.php
Expand Up @@ -93,6 +93,10 @@ function require_mantis_core() {

$$t_bypass_headers = true;
require_once( 'core.php' );

# We need to disable MantisBT's error handler to allow PHPUnit to convert
# errors to exceptions, allowing us to capture and test them.
restore_error_handler();
}


Expand Down

0 comments on commit 7e43fcb

Please sign in to comment.