public function testGetContactReturnsCorrectData() { $this->setMockResponse($this->client, array('contacts/getContact')); $contact = $this->client->getContact(1); $this->assertInstanceOf('\\Mgrt\\Model\\Contact', $contact); $mailingLists = $contact->getMailingLists(); foreach ($mailingLists as $mailingList) { $this->assertInstanceOf('\\Mgrt\\Model\\MailingList', $mailingList); } $customFields = $contact->getCustomFields(); foreach ($customFields as $customField) { $this->assertInstanceOf('\\Mgrt\\Model\\CustomField', $customField); } }