Beispiel #1
0
 public function testGetPostDataClearList()
 {
     //Data
     $refererUrl = 'home/';
     $clearUrl = 'catalog/product_compare/clear';
     $postParams = array(\Magento\Framework\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->compareHelper->urlEncode($refererUrl));
     //Verification
     $this->request->expects($this->once())->method('getServer')->with('HTTP_REFERER')->will($this->returnValue($refererUrl));
     $this->urlBuilder->expects($this->once())->method('getUrl')->with($clearUrl)->will($this->returnValue($clearUrl));
     $this->postDataHelper->expects($this->once())->method('getPostData')->with($clearUrl, $postParams)->will($this->returnValue(true));
     $this->assertTrue($this->compareHelper->getPostDataClearList());
 }
Beispiel #2
0
 public function testGetClearListUrl()
 {
     $this->assertContains('\\/catalog\\/product_compare\\/clear\\/', $this->_helper->getPostDataClearList());
 }