You are here

public function commerce_stripeTestCase::testModule in Commerce Stripe 7

Same name and namespace in other branches
  1. 7.3 commerce_stripe.test \commerce_stripeTestCase::testModule()

File

./commerce_stripe.test, line 35
commerce_stripe.test This file contains the testing code for this module

Class

commerce_stripeTestCase
The test case

Code

public function testModule() {
  $order = (object) array(
    'order_number' => 1234,
  );
  $c = array();
  commerce_stripe_add_metadata($c, $order);
  $this
    ->assertTrue($c['metadata']['order_number'] == 1234, 'Order number is added to the metadata via the hook system');
  $this
    ->assertTrue($c['metadata']['whatever'] == 'test', 'Arbitrary information can be added to the metadata using a hook');
}