From 73a9dce4ebbccabb78cc50c9df3cd6150f182a21 Mon Sep 17 00:00:00 2001 From: nickw Date: Tue, 13 Oct 2009 23:12:13 +0000 Subject: Swallowing all Elgg notices within unit tests. 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 --- engine/tests/objects/objects.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'engine/tests/objects/objects.php') diff --git a/engine/tests/objects/objects.php b/engine/tests/objects/objects.php index de3c2f1c4..632ff4c38 100644 --- a/engine/tests/objects/objects.php +++ b/engine/tests/objects/objects.php @@ -27,6 +27,7 @@ class ElggCoreObjectTest extends ElggCoreUnitTest { * Called after each test method. */ public function tearDown() { + $this->swallowErrors(); unset($this->entity); } @@ -37,9 +38,6 @@ class ElggCoreObjectTest extends ElggCoreUnitTest { parent::__destruct(); } - /** - * A basic test that will be called and fail. - */ public function testElggObjectConstructor() { $attributes = array(); $attributes['guid'] = ''; -- cgit v1.2.3