public function testGetMailingListContactsReturnsCorrectData() { $mailingList = new MailingList(); $mailingList->setId(1); $this->setMockResponse($this->client, array('mailing-lists/listMailingListContacts')); $contacts = $this->client->getMailingListContacts($mailingList); $this->assertInstanceOf('\\Mgrt\\Model\\ResultCollection', $contacts); $this->assertEquals($contacts->count(), 2); foreach ($contacts as $contact) { $this->assertInstanceOf('\\Mgrt\\Model\\Contact', $contact); } }