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); }
public function testHidePrice() { $this->product->expects($this->any())->method('getCanShowPrice')->will($this->returnValue(false)); $this->assertEmpty($this->object->toHtml()); }