/** * * Provide test coverage for major methods, some simple method are knowingly skipped. * * @param string $operation * @param string $apiKeySecret * @param array $httpHeaders * @param string $rawResponseData * @param bool $expectedSignatureValidation * * @dataProvider providerSignatureValidation */ public function testSignatureValidation($operation, $apiKeySecret, $httpHeaders, $rawResponseData, $expectedSignatureValidation) { $resp = new Raven\Response($operation, $httpHeaders, $rawResponseData); if (!preg_match("/payments|events/", $resp->getOperation())) { $this->assertFalse($resp->has('report')); } else { $this->assertStringStartsWith("RavenPaymentFile_v1.0", $resp->get('report')); } $this->assertEquals($expectedSignatureValidation, $resp->validateSignature($apiKeySecret)); }