public function testGetEndpoint($path, $type)
{
if ($type === 'account') {
$specFile = static::$accountSpec;
$baseUrl = '/api/' . static::$apiVersion . '/account/';
} else {
$specFile = static::$userSpec;
$baseUrl = '/api/' . static::$apiVersion . '/user/';
}
$apiResp = $specFile->getResponse($path, Request::METHOD_GET, 200);
$entity = $apiResp->getObjectEntity();
$objectName = $entity->getObjectName();
$apiUrls = $this->mapPath($path, in_array($objectName, $this->checkScope) ? $type : null);
if ($apiUrls->valid()) {
foreach ($apiUrls as $uri) {
$this->assertFilterableProperties($baseUrl . $uri, $apiResp, $uri);
}
} else {
$this->markTestIncomplete("No data for {$path} endpoint or parent endpoint failed");
}
}