Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:mediapart/selligent
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas GASC committed Nov 3, 2016
2 parents 0214140 + 809b2f4 commit e987528
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Properties.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function offsetGet($offset)
{
foreach ($this->Property as $property) {
if ($offset === $property->getKey()) {
return $property;
return $property->getValue();
}
}
return null;
Expand Down
5 changes: 2 additions & 3 deletions tests/PropertiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public function testSimple()
$this->assertNull($properties['EMAIL']);

$properties['NAME'] = 'jacques';
$jacques = $properties['NAME'];
$this->assertEquals('jacques', $jacques->getValue());
$this->assertEquals('jacques', $properties['NAME']);
}

/**
Expand All @@ -60,6 +59,6 @@ public function testObject()
$properties[] = new Property( 'NAME', 'thomas');
$properties[] = new Property('EMAIL', '[email protected]');

$this->assertEquals('thomas', $properties['NAME']->getValue());
$this->assertEquals('thomas', $properties['NAME']);
}
}

0 comments on commit e987528

Please sign in to comment.