MDL-32149 remove some now breaking expectError() uses.
I've tested that unit with debug developer, debug notices and debug none and it passes always. So, as far as I cannot find any reason to have those expectError() there... they are out now.
This commit is contained in:
@@ -119,27 +119,18 @@ class mathsslib_test extends UnitTestCase {
|
||||
* Tests some slightly more complex expressions
|
||||
*/
|
||||
public function test__error_handling() {
|
||||
if (debugging('', DEBUG_DEVELOPER)) {
|
||||
$this->expectError();
|
||||
}
|
||||
$formula = new calc_formula('=pi( + a', array('a'=>10));
|
||||
$res = $formula->evaluate();
|
||||
$this->assertEqual($res, false);
|
||||
$this->assertEqual($formula->get_error(),
|
||||
get_string('unexpectedoperator', 'mathslib', '+'));
|
||||
|
||||
if (debugging('', DEBUG_DEVELOPER)) {
|
||||
$this->expectError();
|
||||
}
|
||||
$formula = new calc_formula('=pi(');
|
||||
$res = $formula->evaluate();
|
||||
$this->assertEqual($res, false);
|
||||
$this->assertEqual($formula->get_error(),
|
||||
get_string('expectingaclosingbracket', 'mathslib'));
|
||||
|
||||
if (debugging('', DEBUG_DEVELOPER)) {
|
||||
$this->expectError();
|
||||
}
|
||||
$formula = new calc_formula('=pi()^');
|
||||
$res = $formula->evaluate();
|
||||
$this->assertEqual($res, false);
|
||||
|
||||
Reference in New Issue
Block a user