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:
Eloy Lafuente (stronk7)
2012-04-04 03:44:10 +02:00
parent a3e7cca432
commit 97e84c80b0
-9
View File
@@ -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);