SevenShores\Hubspot\Tests\Integration\Resources\CompaniesTest::getAssociatedContactsWithCountAndOffset PHP Method

getAssociatedContactsWithCountAndOffset() public method

    public function getAssociatedContactsWithCountAndOffset()
    {
        $newCompanyResponse = $this->createCompany();
        $companyId = $newCompanyResponse['companyId'];
        list($contactId) = $this->createAssociatedContact($companyId);
        list($contactId2) = $this->createAssociatedContact($companyId);
        $response = $this->companies->getAssociatedContacts($companyId, ['count' => 1, 'vidOffset' => $contactId]);
        $this->assertEquals(200, $response->getStatusCode());
        $this->assertCount(1, $response['contacts']);
        $offsetResponse = $this->companies->getAssociatedContacts($companyId, ['count' => 1, 'vidOffset' => $contactId2 + 1]);
        $this->assertEquals(200, $offsetResponse->getStatusCode());
        $this->assertGreaterThanOrEqual($contactId2 + 1, $offsetResponse['vidOffset']);
    }