public function testGetCommentTranslatesComment() { $this->assertEquals('', $this->_model->getComment()); $this->_model->setData(array('comment' => 'some_comment'), 'someScope'); $this->assertEquals(__('some_comment'), $this->_model->getComment()); }
/** * Retrieve comment * * @param string $currentValue * @return string */ public function getComment($currentValue = '') { $comment = ''; if (isset($this->_data['comment'])) { if (is_array($this->_data['comment'])) { if (isset($this->_data['comment']['model'])) { $model = $this->_commentFactory->create($this->_data['comment']['model']); $comment = $model->getCommentText($currentValue); } } else { $comment = parent::getComment(); } } return $comment; }