1 | <?php |
||
20 | final class CommandContext implements Context |
||
21 | { |
||
22 | /** |
||
23 | * @var KernelInterface |
||
24 | */ |
||
25 | private $kernel; |
||
26 | |||
27 | /** |
||
28 | * @var Application |
||
29 | */ |
||
30 | private $application; |
||
31 | |||
32 | /** |
||
33 | * @var Command |
||
34 | */ |
||
35 | private $command; |
||
36 | |||
37 | /** |
||
38 | * @var CommandTester |
||
39 | */ |
||
40 | private $commandTester; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | private $commandException; |
||
46 | |||
47 | /** |
||
48 | * @var string |
||
49 | */ |
||
50 | private $commandExceptionMessage; |
||
51 | |||
52 | /** |
||
53 | * @var array |
||
54 | */ |
||
55 | private $options; |
||
56 | |||
57 | private $eventDispatcher; |
||
58 | |||
59 | public function __construct(KernelInterface $kernel, EventDispatcherInterface $eventDispatcher) |
||
64 | |||
65 | /** |
||
66 | * @When I run the :commandName command with options: |
||
67 | */ |
||
68 | public function iRunTheCommandWithOptions(string $commandName, TableNode $tableNode): void |
||
88 | |||
89 | /** |
||
90 | * @param string $expectedOutput |
||
91 | * |
||
92 | * @Then /^the command output should be "([^"]*)"$/ |
||
93 | */ |
||
94 | public function theCommandOutputShouldBe($expectedOutput): void |
||
101 | |||
102 | /** |
||
103 | * @param string $expectedException |
||
104 | * |
||
105 | * @Then /^the command exception should be "([^"]*)"$/ |
||
106 | */ |
||
107 | public function theCommandExceptionShouldBe(string $expectedException) |
||
117 | |||
118 | /** |
||
119 | * @Then /^the command exception message should be "([^"]*)"$/ |
||
120 | */ |
||
121 | public function theCommandExceptionMessageShouldBe(string $result) |
||
127 | |||
128 | private function setOptions(TableNode $tableNode) |
||
137 | |||
138 | private function getTester(Command $command) |
||
144 | } |
||
145 |