Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0
-
Component/s: Unit tests
-
Labels:None
-
Affected Branches:MOODLE_20_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
Sample code:
function test_error_and_exception () { count(); // results in warning throw new exception('buuuuaa'); // this exception nukes simpletest }
function test_fails_with_exception () { return; }
fails in both tests with:
Exception: lib/dml/simpletest/testdml.php / ? dml_test / ? test_error_and_exception
Unexpected exception of type [Exception] with message [buuuuaa] in [C:\workspace\moodle\lib\dml\simpletest\testdml.php line 65]
Exception: lib/dml/simpletest/testdml.php / ? dml_test / ? test_fails_with_exception
Unexpected PHP error [count() expects at least 1 parameter, 0 given] severity [E_WARNING] in [C:\workspace\moodle\lib\dml\simpletest\testdml.php line 64]
working on a temporary patch ![]()
Temporary fix in cvs, Nicolas could you please review it and try to find less hacky solution please?
We should also report it upstream
thanks