/** * will log a warning when the result code is * for an error or is unknown * @dataProvider provideFailureResultCodes */ public function testLogResultCodeWithError($code) { $response = $this->getModelMockBuilder('ebayenterprise_address/validation_response')->setConstructorArgs([['api' => $this->getMock('\\eBayEnterprise\\RetailOrderManagement\\Api\\IBidirectionalApi'), 'logger' => $this->logger, 'context' => $this->context]])->setMethods(['extractResponseData'])->getMock(); $response->setResultCode($code); $this->logger->expects($this->once())->method('warning'); EcomDev_Utils_Reflection::invokeRestrictedMethod($response, 'logResultCode'); }