本文整理匯總了PHP中Behat\Gherkin\Node\PyStringNode::getLine方法的典型用法代碼示例。如果您正苦於以下問題:PHP PyStringNode::getLine方法的具體用法?PHP PyStringNode::getLine怎麽用?PHP PyStringNode::getLine使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Behat\Gherkin\Node\PyStringNode
的用法示例。
在下文中一共展示了PyStringNode::getLine方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: iSendARequestToUrlWithBody
/**
* @When I send a :method request to URL :url with body:
*/
public function iSendARequestToUrlWithBody($method, $url, PyStringNode $body)
{
$bodyReplace = $body->getRaw();
$bodyReplace = $this->replaceParameters($bodyReplace);
$body = new PyStringNode([$bodyReplace], $body->getLine());
$this->restContext->iSendARequestToWithBody($method, $this->replaceParameters($url), $body);
}
示例2: iSendARequestWithBody
public function iSendARequestWithBody($method, $url, PyStringNode $string)
{
$name = md5($string);
$this->loader->setTemplate($name, (string) $string);
$token = $this->getParameterBag()->get('token');
$this->addHeader('Authorization', 'Bearer ' . $token);
$body = $this->twig->render($name, $this->getParameterBag()->getAll());
$string = new PyStringNode(explode("\n", $body), $string->getLine());
$url = $this->parameterize($url);
parent::iSendARequestWithBody($method, $url, $string);
$this->getParameterBag()->set('response', $this->response);
}
示例3: transformPyString
/**
* @param PyStringNode $stringNode
* @return PyStringNode
*/
protected function transformPyString(PyStringNode $stringNode)
{
$newValue = $this->transformValue($stringNode->getRaw());
$strings = explode("\n", $newValue);
return new PyStringNode($strings, $stringNode->getLine());
}