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

getAssociatedContactIdsWithCountAndOffset() public method

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