public function MailchimpEcommerceTest::testDeleteProduct in Mailchimp 8
Test deleting a product.
File
- lib/
mailchimp-api-php/ tests/ MailchimpEcommerceTest.php, line 652
Class
- MailchimpEcommerceTest
- Mailchimp Ecommerce test library.
Namespace
Mailchimp\TestsCode
public function testDeleteProduct() {
$store_id = 'MC001';
$product_id = 'sku0001';
$mc = new MailchimpEcommerce();
$mc
->deleteProduct($store_id, $product_id);
// Method must be DELETE.
$this
->assertEquals('DELETE', $mc
->getClient()->method);
// Confirm URI being used.
$this
->assertEquals($mc
->getEndpoint() . '/ecommerce/stores/' . $store_id . '/products/' . $product_id, $mc
->getClient()->uri);
}