diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-09 17:11:25 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-09 17:11:25 +0000 |
commit | b62012bf3da994298ad52a4ccec06e814bcc5a79 (patch) | |
tree | e8117952cca46ef10c6543d388e92bd6e232fb34 /engine/tests/objects/entities.php | |
parent | 4bad66f81ae1c6798af56121ffba1045a36ee034 (diff) | |
download | elgg-b62012bf3da994298ad52a4ccec06e814bcc5a79.tar.gz elgg-b62012bf3da994298ad52a4ccec06e814bcc5a79.tar.bz2 |
Creating an ElggObject unit test.
Fixing issues with the unit test plugin hooks, as well as infinite looping bugs introduced by the unit test skeleton.
git-svn-id: http://code.elgg.org/elgg/trunk@3519 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/tests/objects/entities.php')
-rw-r--r-- | engine/tests/objects/entities.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engine/tests/objects/entities.php b/engine/tests/objects/entities.php index be9c11a6f..f3f20024b 100644 --- a/engine/tests/objects/entities.php +++ b/engine/tests/objects/entities.php @@ -112,6 +112,11 @@ class ElggCoreEntityTest extends ElggCoreUnitTest { $annotations = $this->entity->getAnnotations('non_existent'); $this->assertIsA($annotations[0], 'ElggAnnotation'); $this->assertIdentical($annotations[0]->name, 'non_existent'); + $this->assertEqual($this->entity->countAnnotations('non_existent'), 1); + + // clear annotation + $this->assertTrue($this->entity->clearAnnotations()); + $this->assertEqual($this->entity->countAnnotations('non_existent'), 0); // clean up $this->assertTrue($this->entity->delete()); |