/** * @covers ::getCurrency */ public function testCurrency() { $refund = new Refund(); $currency = new Currency('EUR'); $purchase = $this->getMock('CL\\Purchases\\StorePurchase', ['getCurrency']); $purchase->expects($this->once())->method('getCurrency')->will($this->returnValue($currency)); $refund->setStorePurchase($purchase); $this->assertSame($currency, $refund->getCurrency()); }