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

class Stripe_InvoiceTest extends StripeTestCase
{
  public function testUpcoming()
  {
    authorizeFromEnv();
    $customer = self::createTestCustomer();

    Stripe_InvoiceItem::create(
      array(
        'customer'  => $customer->id,
        'amount'    => 0,
        'currency'  => 'usd',
      ));

    $invoice = Stripe_Invoice::upcoming(
      array(
        'customer' => $customer->id,
      ));
    $this->assertEqual($invoice->customer, $customer->id);
    $this->assertEqual($invoice->attempted, false);
  }

}
Return current item: Stripe PHP bindings