public function StripeCustomerCreateTest::testStripeCustomerCreate in Stripe 7
Same name in this branch
- 7 stripe_customer/tests/customers.test \StripeCustomerCreateTest::testStripeCustomerCreate()
- 7 stripe_customer/views/tests/customers.test \StripeCustomerCreateTest::testStripeCustomerCreate()
Access to the customer's default source (last4: 4242)
File
- stripe_customer/
views/ tests/ customers.test, line 35 - Commerce customer profile tests.
Class
- StripeCustomerCreateTest
- Functional tests for the commerce customer UI module.
Code
public function testStripeCustomerCreate() {
// Create a dummy customer on Stripe.
$source = $this->customer
->testCustomerAddSource();
$saved = $this->customer
->testSave();
$default_source = \Stripe\SourceTest::retrieve($this->customer->default_source);
$this
->assertTrue($default_source->last4 == '4242', t('Created a test source card in Stripe.'));
}