public function testGetRefreshPathUrl() { $url = 'some/magento/refresh/path/url'; $params = ['argument' => 'value']; $this->urlBuilderMock->expects($this->once())->method('getUrl')->with('catalog/*/refreshPath', ['_current' => true, '_query' => ['isAjax' => null], 'argument' => 'value'])->willReturn($url); $this->assertEquals($url, $this->form->getRefreshPathUrl($params)); }
/** * Run test getCategoryId method * * @return int */ public function testGetCategoryId() { $this->requestMock->expects($this->once())->method('getParam')->with('id')->will($this->returnValue(789)); $this->assertEquals(789, $this->form->getCategoryId()); }