Esempio n. 1
0
 public function testRenderMsrpNotRegisteredException()
 {
     $this->logger->expects($this->once())->method('logException');
     $this->priceInfo->expects($this->once())->method('getPrice')->with($this->equalTo('msrp_price'))->will($this->throwException(new \InvalidArgumentException()));
     $result = $this->object->toHtml();
     //assert price wrapper
     $this->assertStringStartsWith('<div', $result);
     //assert css_selector
     $this->assertRegExp('/[final_price]/', $result);
 }
Esempio n. 2
0
 public function testHidePrice()
 {
     $this->product->expects($this->any())->method('getCanShowPrice')->will($this->returnValue(false));
     $this->assertEmpty($this->object->toHtml());
 }