1 | <?php |
||
12 | class CommandContext extends RawMinkContext |
||
13 | { |
||
14 | /** |
||
15 | * @var StreamOutput |
||
16 | */ |
||
17 | private $output; |
||
18 | |||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | private $exitCode; |
||
23 | |||
24 | /** |
||
25 | * @var \Exception |
||
26 | */ |
||
27 | private $exception; |
||
28 | |||
29 | /** |
||
30 | * @var Application |
||
31 | */ |
||
32 | private $application; |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | public function initialize(array $config, ContainerInterface $container) |
||
42 | |||
43 | /** |
||
44 | * @param string $command |
||
45 | * |
||
46 | * @When /^I run (.*)$/ |
||
47 | */ |
||
48 | public function iRunCommand($command) |
||
62 | |||
63 | /** |
||
64 | * @param int $code |
||
65 | * |
||
66 | * @throws ExpectationException |
||
67 | * |
||
68 | * @Then /^Command should be successfully executed$/ |
||
69 | * @Then /^Command exit code should be (?P<code>\-\d+|\d+)$/ |
||
70 | */ |
||
71 | public function commandExitCodeShouldBe($code = 0) |
||
83 | |||
84 | /** |
||
85 | * @param PyStringNode $message |
||
86 | * |
||
87 | * @throws ExpectationException |
||
88 | * |
||
89 | * @Then /^Command should throw an exception$/ |
||
90 | * @Then /^Command should throw following exception:?$/ |
||
91 | */ |
||
92 | public function commandShouldThrowException(PyStringNode $message = null) |
||
113 | |||
114 | /** |
||
115 | * @param PyStringNode $string |
||
116 | * |
||
117 | * @throws \Exception |
||
118 | * @throws ExpectationException |
||
119 | * |
||
120 | * @Then /^Command output should be like:?$/ |
||
121 | */ |
||
122 | public function commandOutputShouldBeLike(PyStringNode $string) |
||
137 | |||
138 | /** |
||
139 | * @return string |
||
140 | * |
||
141 | * @throws \Exception |
||
142 | */ |
||
143 | private function getRawCommandOutput() |
||
152 | } |
||
153 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: