public function testGetHtmlTxnIdIsNull() { $this->eventManagerMock->expects($this->once())->method('dispatch'); $this->transaction->setData('txn_id', 'test'); $this->assertEquals('test', $this->transaction->getHtmlTxnId()); $this->assertEquals(null, $this->transaction->getData('html_txn_id')); }
/** * Render block html * * @return string */ protected function _toHtml() { $this->setTxnIdHtml($this->adminHelper->escapeHtmlWithLinks($this->_txn->getHtmlTxnId(), ['a'])); $this->setParentTxnIdUrlHtml($this->escapeHtml($this->getUrl('sales/transactions/view', ['txn_id' => $this->_txn->getParentId()]))); $this->setParentTxnIdHtml($this->escapeHtml($this->_txn->getParentTxnId())); $this->setOrderIncrementIdHtml($this->escapeHtml($this->_txn->getOrder()->getIncrementId())); $this->setTxnTypeHtml($this->escapeHtml($this->_txn->getTxnType())); $this->setOrderIdUrlHtml($this->escapeHtml($this->getUrl('sales/order/view', ['order_id' => $this->_txn->getOrderId()]))); $this->setIsClosedHtml($this->_txn->getIsClosed() ? __('Yes') : __('No')); $createdAt = strtotime($this->_txn->getCreatedAt()) ? $this->formatDate($this->_txn->getCreatedAt(), \IntlDateFormatter::MEDIUM, true) : __('N/A'); $this->setCreatedAtHtml($this->escapeHtml($createdAt)); return parent::_toHtml(); }