如何在FeatureContext方法中获取uuid(动态值)

时间:2017-09-07 14:23:44

标签: php testing bdd behat symfony-2.8

我的代码只能访问硬编码ID(/ api / user / {id})。但我希望它适用于动态值(例如:uuid)。

entry: `./${conf.path.src('index')}`

额外功能:

/**
 * @When I send a :http request to :url
 *
 * @param $http
 * @param $url
 */
public function iSendARequestTo($http, $url)
{
    $url = $this->attachQueries($url);

    if ($this->isUrlContainsRuntimeParameters($url)) {
        $url = $this->mergeRuntimeParametersValues($url);
    }

        $this->client->request(
            $http,
            $url,
            $this->parameters,
            [],
            $this->headers,
            $this->rawData
        );

    $this->response = $this->client->getResponse();
}

我想重建方法" iSendARequestTo()"使其适用于动态Doctrine值(例如uuid)

0 个答案:

没有答案