1 | <?php |
||
8 | class FeatureContext implements KernelAwareContext |
||
9 | { |
||
10 | private $kernel; |
||
11 | private $containerParameters; |
||
12 | private $parameterKey; |
||
13 | |||
14 | /** |
||
15 | * Sets HttpKernel instance. |
||
16 | * This method will be automatically called by Symfony2Extension ContextInitializer. |
||
17 | * |
||
18 | * @param KernelInterface $kernel |
||
19 | */ |
||
20 | public function setKernel(KernelInterface $kernel) |
||
21 | { |
||
22 | $this->kernel = $kernel; |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @Given /^I have a kernel instance$/ |
||
27 | */ |
||
28 | public function iHaveAKernelInstance() |
||
29 | { |
||
30 | \PHPUnit_Framework_Assert::assertInstanceOf('Symfony\\Component\\HttpKernel\\KernelInterface', $this->kernel); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @When /^I get container parameters from it$/ |
||
35 | */ |
||
36 | public function iGetContainerParametersFromIt() |
||
37 | { |
||
38 | $this->containerParameters = $this->kernel->getContainer()->getParameterBag()->all(); |
||
|
|||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @Then /^there should be "([^"]*)" parameter$/ |
||
43 | */ |
||
44 | public function thereShouldBeParameter($key) |
||
45 | { |
||
46 | \PHPUnit_Framework_Assert::assertArrayHasKey($key, $this->containerParameters); |
||
47 | $this->parameterKey = $key; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @Then /^there should not be "([^"]*)" parameter$/ |
||
52 | */ |
||
53 | public function thereShouldNotBeParameter($key) |
||
57 | |||
58 | /** |
||
59 | * @Given /^it should be set to "([^"]*)" value$/ |
||
60 | */ |
||
61 | public function itShouldBeSetToValue($val) |
||
65 | |||
66 | /** |
||
67 | * @Then the value should be an array |
||
68 | */ |
||
69 | public function theValueShouldBeAnArray() |
||
73 | |||
74 | /** |
||
75 | * @Then the array should contain only the values :arg |
||
76 | * @param string $arg Comma delimited string, to represent an array's values |
||
77 | */ |
||
78 | public function theArrayShouldContainOnlyTheValues($arg) |
||
84 | } |
||
85 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.