MailchimpTemplatesTest.php in Mailchimp 8
File
lib/mailchimp-api-php/tests/MailchimpTemplatesTest.php
View source
<?php
namespace Mailchimp\Tests;
use PHPUnit\Framework\TestCase;
class MailchimpTemplatesTest extends TestCase {
public function testGetTemplates() {
$mc = new MailchimpTemplates();
$mc
->getTemplates();
$this
->assertEquals('GET', $mc
->getClient()->method);
$this
->assertEquals($mc
->getEndpoint() . '/templates', $mc
->getClient()->uri);
}
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);
}
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);
}
}