Scalr\Tests\Functional\Api\V2\ApiTest::mapApiResponsePk PHP Method

mapApiResponsePk() protected method

On the based api endpoint and name api object return primary key If pk don't exist in paramMath throw fail
protected mapApiResponsePk ( string $path, string $objectName ) : string
$path string Api endpoint
$objectName string Name object entity from specification
return string
    protected function mapApiResponsePk($path, $objectName)
    {
        if (preg_match('#/(?<object>[\\w-]+)/({\\w+}\\/?)?$#', $path, $match) && isset($this->paramMap[$match['object']][$objectName])) {
            return $this->paramMap[$match['object']][$objectName];
        }
        $this->markTestIncomplete(sprintf("%s %s don't exist in ApiTest::paramMap", $match['object'], $objectName));
    }