public function testGetContactById() { $contact = array('Email' => '*****@*****.**', 'AudienceType' => 'B2B', 'OptInType' => 'Single', 'EmailType' => 'Html', 'Notes' => 'This is an API test contact'); $fields = array('FIRSTNAME' => 'John', 'LASTNAME' => 'Test'); $result = $this->object->AddContactToAddressBook($contact, $fields, $this->addressBookId); if ($result === FALSE) { $this->fail('Failed adding contact to address book.'); return; } $contact['ID'] = $result->ID; $foundContact = $this->object->GetContactById($contact['ID']); $this->assertTrue(is_numeric($foundContact->ID)); $this->assertEquals($contact['Email'], $foundContact->Email); }