/** * @covers \Magento\Usps\Helper\Data::displayGirthValue */ public function testDisplayGirthValueFalse() { $this->assertFalse($this->_helperData->displayGirthValue('test_shipping_method')); }
/** * Is display girth value for specified shipping method * * @param \Magento\Shipping\Block\Adminhtml\Order\Packaging $subject * @param \Closure $proceed * * @return bool * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundIsDisplayGirthValue(Packaging $subject, \Closure $proceed) { return $this->helper->displayGirthValue($subject->getShipment()->getOrder()->getShippingMethod()); }
/** * Add rule to isGirthAllowed() method * * @param \Magento\Framework\Object $subject $subject * @param bool $result * @return bool * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterIsGirthAllowed(\Magento\Framework\Object $subject, $result) { return $result && $this->uspsHelper->displayGirthValue($this->request->getParam('method')); }