class MailchimpTemplatesTest in Mailchimp 8
Mailchimp Templates test library.
@package Mailchimp\Tests
Hierarchy
- class \Mailchimp\Tests\MailchimpTemplatesTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of MailchimpTemplatesTest
File
- lib/
mailchimp-api-php/ tests/ MailchimpTemplatesTest.php, line 12
Namespace
Mailchimp\TestsView source
class MailchimpTemplatesTest extends TestCase {
/**
* Tests library functionality for templates information.
*/
public function testGetTemplates() {
$mc = new MailchimpTemplates();
$mc
->getTemplates();
$this
->assertEquals('GET', $mc
->getClient()->method);
$this
->assertEquals($mc
->getEndpoint() . '/templates', $mc
->getClient()->uri);
}
/**
* Tests library functionality for template information.
*/
public function testGetTemplate() {
$template_id = '2000094';
$mc = new MailchimpTemplates();
$mc
->getTemplate($template_id);
$this
->assertEquals('GET', $mc
->getClient()->method);
$this
->assertEquals($mc
->getEndpoint() . '/templates/' . $template_id, $mc
->getClient()->uri);
}
/**
* Tests library functionality for template content information.
*/
public function testGetTemplateContent() {
$template_id = '2000094';
$mc = new MailchimpTemplates();
$mc
->getTemplateContent($template_id);
$this
->assertEquals('GET', $mc
->getClient()->method);
$this
->assertEquals($mc
->getEndpoint() . '/templates/' . $template_id . '/default-content', $mc
->getClient()->uri);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MailchimpTemplatesTest:: |
public | function | Tests library functionality for template information. | |
MailchimpTemplatesTest:: |
public | function | Tests library functionality for template content information. | |
MailchimpTemplatesTest:: |
public | function | Tests library functionality for templates information. |