1 | <?php declare(strict_types=1); |
||
20 | class RequestContext implements Context |
||
21 | { |
||
22 | use Builder; |
||
23 | |||
24 | /** @var RequestInterface */ |
||
25 | private $request; |
||
26 | |||
27 | /** @var mixed[] Query args to add */ |
||
28 | private $query; |
||
29 | |||
30 | /** @var HttpClient|HttpAsyncClient */ |
||
31 | private $client; |
||
32 | |||
33 | public function __construct(PluginClientBuilder $builder, StreamFactory $streamFactory, MessageFactory $messageFactory) |
||
41 | |||
42 | /** @When /^I create a "(?P<method>GET|POST|PATCH|PUT|DELETE|OPTIONS|HEAD)" request to "(?P<url>.+?)"$/ */ |
||
43 | final public function create_a_request(string $method, string $url): void |
||
53 | |||
54 | /** |
||
55 | * @When /^I send a "(?P<method>GET|POST|PATCH|PUT|DELETE|OPTIONS|HEAD)" request to "(?P<url>.+?)"$/ |
||
56 | * |
||
57 | * ------- |
||
58 | * |
||
59 | * Shortcut for `When I create a X request to Then send the request` |
||
60 | */ |
||
61 | final public function send_a_request($method, $url): void |
||
66 | |||
67 | /** @When I add/set the value :value to the parameter :parameter */ |
||
68 | final public function add_a_parameter(string $parameter, string $value): void |
||
84 | |||
85 | /** @When I set the following query arguments: */ |
||
86 | final public function set_the_parameters(TableNode $parameters): void |
||
94 | |||
95 | /** @When I set the content-type to :type */ |
||
96 | final public function set_the_content_type(string $type): void |
||
101 | |||
102 | /** @When I set the following body: */ |
||
103 | final public function set_the_body(string $body): void |
||
110 | |||
111 | /** @When I add/set the value :value to the header :header */ |
||
112 | final public function add_header(string $header, string $value): void |
||
117 | |||
118 | /** @When I set the headers: */ |
||
119 | final public function set_headers(TableNode $headers): void |
||
129 | |||
130 | /** @When I send the request */ |
||
131 | final public function send_request(): void |
||
151 | |||
152 | /** @AfterScenario @api */ |
||
153 | final public function clearCache(): void |
||
158 | |||
159 | final public function getRequest(): RequestInterface |
||
167 | |||
168 | protected function getDefaultContentType(): string |
||
172 | } |
||
173 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.