Example #1
0
 /**
  * @param bool $expectedResult
  * @param \Magento\Framework\Object $response
  * @param array $configMap
  * @param int $exactlyCount
  *
  * @dataProvider validationDataProvider
  */
 public function testValidation($expectedResult, \Magento\Framework\Object $response, array $configMap, $exactlyCount)
 {
     $this->configMock->expects($this->exactly($exactlyCount))->method('getValue')->willReturnMap($configMap);
     $this->assertEquals($expectedResult, $this->validator->validate($response));
     if (!$expectedResult) {
         $this->assertNotEmpty($response->getRespmsg());
     }
 }
 /**
  * @param bool $expectedResult
  * @param \Magento\Framework\DataObject $response
  * @param array $configMap
  * @param int $exactlyCount
  *
  * @dataProvider validationDataProvider
  */
 public function testValidation($expectedResult, \Magento\Framework\DataObject $response, array $configMap, $exactlyCount)
 {
     $this->payflowproFacade->expects(static::once())->method('getConfig')->willReturn($this->configMock);
     $this->configMock->expects(static::exactly($exactlyCount))->method('getValue')->willReturnMap($configMap);
     static::assertEquals($expectedResult, $this->validator->validate($response, $this->payflowproFacade));
     if (!$expectedResult) {
         static::assertNotEmpty($response->getRespmsg());
     }
 }