public function value()
{
$internal = $this->attribute->value();
if (isset($internal[$this->name])) {
return $internal[$this->name];
} else {
throw new Horde_Kolab_Server_Exception(sprintf('Missing value %s!', $this->name));
}
}
public function testMethodValueHasResultArrayTheValuesOfTheAttribute() { $attribute = new Horde_Kolab_Server_Object_Attribute_Value($this->object, $this->composite, 'name'); $this->object->expects($this->once())->method('getInternal')->with('name')->will($this->returnValue(array(1, 2))); $this->assertEquals(array(1, 2), $attribute->value()); }