You are here

function Braintree_WebhookNotificationTest::testParsingInvalidSignatureRaisesError in Commerce Braintree 7

File

braintree_php/tests/unit/WebhookNotificationTest.php, line 59

Class

Braintree_WebhookNotificationTest

Code

function testParsingInvalidSignatureRaisesError() {
  $sampleNotification = Braintree_WebhookTesting::sampleNotification(Braintree_WebhookNotification::SUBSCRIPTION_WENT_PAST_DUE, 'my_id');
  $this
    ->setExpectedException('Braintree_Exception_InvalidSignature');
  $webhookNotification = Braintree_WebhookNotification::parse("bad_signature", $sampleNotification['payload']);
}