You are here

public function MailchimpEcommerceTest::testDeleteCart in Mailchimp 8

Tests library function for deleting a cart.

File

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

Class

MailchimpEcommerceTest
Mailchimp Ecommerce test library.

Namespace

Mailchimp\Tests

Code

public function testDeleteCart() {
  $store_id = 'MC001';
  $cart_id = 'cart0001';
  $mc = new MailchimpEcommerce();
  $mc
    ->deleteCart($store_id, $cart_id);
  $this
    ->assertEquals('DELETE', $mc
    ->getClient()->method);
  $this
    ->assertEquals($mc
    ->getEndPoint() . '/ecommerce/stores/' . $store_id . '/carts/' . $cart_id, $mc
    ->getClient()->uri);
}