aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/objects
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-18 06:33:17 -0500
committercash <cash.costello@gmail.com>2011-11-28 21:43:59 -0500
commit76be18d640fed252546fbb5da99b6dea5e127cac (patch)
treed8879bd9092234608b4836e018ab383e5ebdeb47 /engine/tests/objects
parent9744fc8b3110553b4dd9f563fe17eef89fdeb830 (diff)
downloadelgg-76be18d640fed252546fbb5da99b6dea5e127cac.tar.gz
elgg-76be18d640fed252546fbb5da99b6dea5e127cac.tar.bz2
Fixes #4104, #4105 fixed casting in testElggEntityMetadata()
Diffstat (limited to 'engine/tests/objects')
-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());