/** * @see DataValue::getShortWikiText */ public function setCaption($caption) { $this->m_caption = $caption; if ($this->lastPropertyChainValue !== null) { $this->lastPropertyChainValue->setCaption($caption); } }
public function testFormatWithCaptionOutput() { $propertyValue = new PropertyValue(); $propertyValue->setDataItem($this->dataItemFactory->newDIProperty('Foo')); $propertyValue->setCaption('ABC[<>]'); $instance = new PropertyValueFormatter($propertyValue); $this->assertEquals('ABC[<>]', $instance->format(PropertyValueFormatter::WIKI_SHORT)); $this->assertEquals('ABC[<>]', $instance->format(PropertyValueFormatter::HTML_SHORT)); }