From 3de7c03c391897f04fde7e86296221122de882f5 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 18 Nov 2011 06:42:45 -0500 Subject: Fixes #4108 delete() returns bool now and updated unit tests --- engine/tests/objects/sites.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engine/tests/objects/sites.php') diff --git a/engine/tests/objects/sites.php b/engine/tests/objects/sites.php index e5acbb3f9..a05074c59 100644 --- a/engine/tests/objects/sites.php +++ b/engine/tests/objects/sites.php @@ -66,8 +66,10 @@ class ElggCoreSiteTest extends ElggCoreUnitTest { } public function testElggSiteSaveAndDelete() { - $this->assertTrue($this->site->save()); - $this->assertTrue($this->site->delete()); + $guid = $this->site->save(); + $this->assertIsA($guid, 'int'); + $this->assertTrue($guid > 0); + $this->assertIdentical(true, $this->site->delete()); } } -- cgit v1.2.3 From a47f57775f3dfbb5f006c9a0fa8ea794ba46ad51 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 18 Nov 2011 06:46:03 -0500 Subject: Fixes #4109 remove inaccurate comment due to copy & paste --- engine/tests/api/metastrings.php | 6 ------ engine/tests/objects/sites.php | 3 --- engine/tests/objects/users.php | 3 --- engine/tests/test_skeleton.php | 3 --- 4 files changed, 15 deletions(-) (limited to 'engine/tests/objects/sites.php') diff --git a/engine/tests/api/metastrings.php b/engine/tests/api/metastrings.php index 9b5d7ee4e..0a008c6ce 100644 --- a/engine/tests/api/metastrings.php +++ b/engine/tests/api/metastrings.php @@ -68,9 +68,6 @@ class ElggCoreMetastringsTest extends ElggCoreUnitTest { parent::__destruct(); } - /** - * A basic test that will be called and fail. - */ public function testDeleteByID() { $db_prefix = elgg_get_config('dbprefix'); $annotations = $this->createAnnotations(1); @@ -101,9 +98,6 @@ class ElggCoreMetastringsTest extends ElggCoreUnitTest { } } - /** - * A basic test that will be called and fail. - */ public function testEnableDisableByID() { $db_prefix = elgg_get_config('dbprefix'); $annotations = $this->createAnnotations(1); diff --git a/engine/tests/objects/sites.php b/engine/tests/objects/sites.php index a05074c59..a01a661e3 100644 --- a/engine/tests/objects/sites.php +++ b/engine/tests/objects/sites.php @@ -36,9 +36,6 @@ class ElggCoreSiteTest extends ElggCoreUnitTest { parent::__destruct(); } - /** - * A basic test that will be called and fail. - */ public function testElggSiteConstructor() { $attributes = array(); $attributes['guid'] = NULL; diff --git a/engine/tests/objects/users.php b/engine/tests/objects/users.php index 901d76ac0..a3573acb6 100644 --- a/engine/tests/objects/users.php +++ b/engine/tests/objects/users.php @@ -41,9 +41,6 @@ class ElggCoreUserTest extends ElggCoreUnitTest { parent::__destruct(); } - /** - * A basic test that will be called and fail. - */ public function testElggUserConstructor() { $attributes = array(); $attributes['guid'] = NULL; diff --git a/engine/tests/test_skeleton.php b/engine/tests/test_skeleton.php index e5ff557e5..5a5de89bb 100644 --- a/engine/tests/test_skeleton.php +++ b/engine/tests/test_skeleton.php @@ -49,9 +49,6 @@ class ElggCoreSkeletonTest extends ElggCoreUnitTest { parent::__destruct(); } - /** - * A basic test that will be called and fail. - */ public function testFailure() { $this->assertTrue(FALSE); } -- cgit v1.2.3