public function testValidate() { $countryId = 'US'; $ccType = "VI"; $this->setupInfoInstance($countryId, $ccType, null); $this->model->setInfoInstance($this->infoInstanceMock); $this->configMock->expects($this->once())->method('canUseForCountry')->with($countryId)->willReturn(true); $this->configMock->expects($this->once())->method('canUseCcTypeForCountry')->with($countryId, $ccType)->willReturn(null); $this->assertEquals($this->model, $this->model->validate()); }