Location: PHPKode > scripts > Stripe PHP bindings > stripe-php-1.7.11/test/Stripe/AuthenticationErrorTest.php
<?php

class Stripe_AuthenticationErrorTest extends UnitTestCase
{
  public function testInvalidCredentials()
  {
    Stripe::setApiKey('invalid');
    try {
      Stripe_Customer::create();
    } catch (Stripe_AuthenticationError $e) {
      $this->assertEqual(401, $e->getHttpStatus());
    }
  }
}
Return current item: Stripe PHP bindings