/** * Test getShippingRate method */ public function testGetShippingRate() { $rate = $this->getMock('Magento\\Quote\\Model\\Quote\\Address\\Rate', ['__wakeup'], [], '', false); $this->shippingAddress->setShippingMethod(self::SHIPPING_METHOD); $this->shippingAddress->expects($this->once())->method('getShippingRateByCode')->with(self::SHIPPING_METHOD)->will($this->returnValue($rate)); $this->assertEquals($rate, $this->model->getShippingRate()); }