You are here

class MailchimpTest in Mailchimp 8

Mailchimp library test cases.

@package Mailchimp\Tests

Hierarchy

  • class \Mailchimp\Tests\MailchimpTest extends \PHPUnit\Framework\TestCase

Expanded class hierarchy of MailchimpTest

File

lib/mailchimp-api-php/tests/MailchimpTest.php, line 12

Namespace

Mailchimp\Tests
View source
class MailchimpTest extends TestCase {

  /**
   * Tests library functionality for account information.
   */
  public function testGetAccount() {
    $mc = new Mailchimp();
    $mc
      ->getAccount();
    $this
      ->assertEquals('GET', $mc
      ->getClient()->method);
    $this
      ->assertEquals($mc
      ->getEndpoint() . '/', $mc
      ->getClient()->uri);
  }

  /**
   * Test the version number.
   */
  public function testVersion() {
    $mc = new Mailchimp();
    $this
      ->assertEquals($mc::VERSION, '2.0.0');
    $this
      ->assertEquals(json_decode(file_get_contents('composer.json'))->version, $mc::VERSION);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MailchimpTest::testGetAccount public function Tests library functionality for account information.
MailchimpTest::testVersion public function Test the version number.