#4095 closed Defect (fixed)
testElggEnityGetAndSetAnnotations() test passes due to casting
| Reported by: | andres.fortier | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.8.2 |
| Component: | Core | Version: | 1.8 |
| Severity: | minor | Keywords: | |
| Cc: | brett@… | Difficulty: |
Description
Elgg 1.8.0.1
Similar to ticket #4094, in line 106:
$this->assertFalse($this->entity->getAnnotations('non_existent'));
I'm getting an empty array as a result of $this->entity->getAnnotations('non_existent'), which, when casted to a boolean, is false.
Possible fix:
$this->assertIdentical($this->entity->getAnnotations('non_existent'), array());
Change History (3)
comment:1 Changed 18 months ago by cash
- Milestone changed from Needs Review to Elgg 1.8.2
comment:2 Changed 18 months ago by Cash Costello
- Resolution set to fixed
- Status changed from new to closed
comment:3 Changed 18 months ago by Cash Costello
Fixes #4094, #4095 fixes casting issues in unit tests - thanks to andres.fortier
Changeset: 68ee90fc6c1ff9db8d5f90c3276d5a1d3d61873d
Note: See
TracTickets for help on using
tickets.

Fixes #4094, #4095 fixes casting issues in unit tests - thanks to andres.fortier