You are here

public function MailchimpEcommerceTest::testGetCartLine in Mailchimp 8

Tests library function for getting a specific cart's line item.

File

lib/mailchimp-api-php/tests/MailchimpEcommerceTest.php, line 223

Class

MailchimpEcommerceTest
Mailchimp Ecommerce test library.

Namespace

Mailchimp\Tests

Code

public function testGetCartLine() {
  $store_id = 'MC001';
  $cart_id = 'cart0001';
  $line_id = 'line002';
  $mc = new MailchimpEcommerce();
  $mc
    ->getCartLine($store_id, $cart_id, $line_id);
  $this
    ->assertEquals('GET', $mc
    ->getClient()->method);
  $this
    ->assertEquals($mc
    ->getEndpoint() . '/ecommerce/stores/' . $store_id . '/carts/' . $cart_id . '/lines/' . $line_id, $mc
    ->getClient()->uri);
}