public function MailchimpEcommerceTest::testGetVariant in Mailchimp 8
Test getting a single variant of a single product.
File
- lib/
mailchimp-api-php/ tests/ MailchimpEcommerceTest.php, line 701
Class
- MailchimpEcommerceTest
- Mailchimp Ecommerce test library.
Namespace
Mailchimp\TestsCode
public function testGetVariant() {
$store_id = 'MC001';
$product_id = 'sku0001';
$variant_id = 'var001';
$mc = new MailchimpEcommerce();
$mc
->getProductVariant($store_id, $product_id, $variant_id);
// Check method.
$this
->assertEquals('GET', $mc
->getClient()->method);
// Check URI being used.
$this
->assertEquals($mc
->getEndpoint() . '/ecommerce/stores/' . $store_id . '/products/' . $product_id . '/variants/' . $variant_id, $mc
->getClient()->uri);
}