public function testCreateTaxRateCollectionItem() { $this->rateServiceMock->expects($this->once())->method('getList')->with($this->searchCriteriaMock)->willReturn($this->searchResultsMock); $this->searchResultsMock->expects($this->once())->method('getTotalCount')->willReturn(123); $this->searchResultsMock->expects($this->once())->method('getItems')->willReturn([$this->taxRateMock]); $this->taxRateMock->expects($this->once())->method('getId')->willReturn(33); $this->taxRateMock->expects($this->once())->method('getCode')->willReturn(44); $this->taxRateMock->expects($this->once())->method('getTaxCountryId')->willReturn('CountryId'); $this->taxRateMock->expects($this->once())->method('getTaxRegionId')->willReturn(55); $this->taxRateMock->expects($this->once())->method('getRegionName')->willReturn('Region Name'); $this->taxRateMock->expects($this->once())->method('getTaxPostcode')->willReturn('Post Code'); $this->taxRateMock->expects($this->once())->method('getRate')->willReturn(1.85); $this->rateConverterMock->expects($this->once())->method('createTitleArrayFromServiceObject')->with($this->taxRateMock)->willReturn([]); $this->taxRateMock->expects($this->exactly(2))->method('getZipTo')->willReturn(1); $this->taxRateMock->expects($this->exactly(2))->method('getZipFrom')->willReturn(200); $this->model->loadData(); }