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