public getPrice ( Sonata\Component\Product\ProductInterface $product, Sonata\Component\Currency\CurrencyInterface $currency, $vat = false ) | ||
$product | Sonata\Component\Product\ProductInterface | |
$currency | Sonata\Component\Currency\CurrencyInterface |
public function testGetPrice() { $currencyPriceCalculator = new CurrencyPriceCalculator(); $product = $this->getMock('Sonata\\Component\\Product\\ProductInterface'); $currency = new Currency(); $currency->setLabel('EUR'); $product->expects($this->once())->method('getPrice')->will($this->returnValue(42.0)); $this->assertEquals(42.0, $currencyPriceCalculator->getPrice($product, $currency)); }