By default, SimpleTest converts PHP errors into exceptions. This is restricted by adding a call to swallowErrors() within the tearDown() methods. This has also been noted within the unit test skeleton.
git-svn-id: http://code.elgg.org/elgg/trunk@3535
36083f99-b078-4883-b0ff-
0f9b5a30f544
* Called after each test method.
*/
public function tearDown() {
+ $this->swallowErrors();
unset($this->entity);
}
* Called after each test method.
*/
public function tearDown() {
+ $this->swallowErrors();
unset($this->entity);
}
parent::__destruct();
}
- /**
- * A basic test that will be called and fail.
- */
public function testElggObjectConstructor() {
$attributes = array();
$attributes['guid'] = '';
*/
public function __construct() {
parent::__construct();
+
+ // all code should come after here
}
/**
* Called after each test method.
*/
public function tearDown() {
-
+ // do not allow SimpleTest to interpret Elgg notices as exceptions
+ $this->swallowErrors();
}
/**
* Called after each test object.
*/
public function __destruct() {
+ // all code should go above here
parent::__destruct();
}