public function getIcon() { if ($this->getData('icon') === null) { $icon = Icon\Model::fromId($this->getDocumentType()->getIconId()); if (empty($icon)) { return false; } $this->setData('icon', $icon->getUrl()); } return $this->getData('icon'); }
/** * Test * * @return void */ public function testGetEmptyIcon() { $this->object->getDocumentType()->setIconId(42000); $this->assertFalse($this->object->getIcon()); }