나는이 내 다음과 같은 방법 내 FeatureContext.php
:Behat 문자열 PyStringNode
/**
* @When /^I send a ([A-Z]+) request to "([^"]*)" (with the data)$/
*/
public function iSendARequestToWithData($method, $uri, PyStringNode $string)
{
$request = $this->client->createRequest($method, $this->base_url.$uri);
$this->response = $this->client->send($request);
}
내 기능을 실행,이 줄은 실패
When I send a POST request to "/items" with the data
"""
{
"category": 1
}
"""
으로 다음 오류 :
Catchable Fatal Error: Argument 3 passed to FeatureContext::iSendARequestToWithData() must be an instance of Behat\Gherkin\Node\PyStringNode, string given in app/tests/acceptance/FeatureContext.php line 68
나는이 정규 표현식, 특히 (with the data)
,하지만 난 그걸 고칠 방법을 전혀 모른다.