aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-18 06:33:17 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-18 06:33:17 -0500
commite1b2cf3b9499f0a5a649e4695f7a26d3a3bf6ddb (patch)
tree3293275b3436e1f058f76af4cb79d90b6116c9ab
parentd792a0987ef0c3f292c038effded241793b32b73 (diff)
downloadelgg-e1b2cf3b9499f0a5a649e4695f7a26d3a3bf6ddb.tar.gz
elgg-e1b2cf3b9499f0a5a649e4695f7a26d3a3bf6ddb.tar.bz2
Fixes #4104, #4105 fixed casting in testElggEntityMetadata()
-rw-r--r--engine/tests/objects/entities.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/engine/tests/objects/entities.php b/engine/tests/objects/entities.php
index e010a3fa7..06bc80a4a 100644
--- a/engine/tests/objects/entities.php
+++ b/engine/tests/objects/entities.php
@@ -230,24 +230,26 @@ class ElggCoreEntityTest extends ElggCoreUnitTest {
// let's delete a non-existent metadata
$this->assertFalse($this->entity->deleteMetadata('important'));
- // let's add the meatadata
- $this->assertTrue($this->entity->important = 'indeed!');
- $this->assertTrue($this->entity->less_important = 'true, too!');
+ // let's add the metadata
+ $this->entity->important = 'indeed!';
+ $this->assertIdentical('indeed!', $this->entity->important);
+ $this->entity->less_important = 'true, too!';
+ $this->assertIdentical('true, too!', $this->entity->less_important);
$this->save_entity();
// test deleting incorrectly
// @link http://trac.elgg.org/ticket/2273
- $this->assertFalse($this->entity->deleteMetadata('impotent'));
+ $this->assertNull($this->entity->deleteMetadata('impotent'));
$this->assertEqual($this->entity->important, 'indeed!');
// get rid of one metadata
$this->assertEqual($this->entity->important, 'indeed!');
$this->assertTrue($this->entity->deleteMetadata('important'));
- $this->assertEqual($this->entity->important, '');
+ $this->assertNull($this->entity->important);
// get rid of all metadata
$this->assertTrue($this->entity->deleteMetadata());
- $this->assertEqual($this->entity->less_important, '');
+ $this->assertNull($this->entity->less_important);
// clean up database
$this->assertTrue($this->entity->delete());