1 | <?php |
||
9 | class FeatureContext extends RawMinkContext implements SnippetAcceptingContext |
||
|
|||
10 | { |
||
11 | private $tmpDir; |
||
12 | private $fs; |
||
13 | private $app; |
||
14 | |||
15 | /** |
||
16 | * Initializes context. Every scenario gets its own context object. |
||
17 | * |
||
18 | * @param array $parameters Suite parameters (set them up through behat.yml) |
||
19 | */ |
||
20 | public function __construct() |
||
30 | |||
31 | public function createSchema() |
||
39 | |||
40 | /** |
||
41 | * @Given I write in :path: |
||
42 | */ |
||
43 | public function iWriteIn($path, PyStringNode $class) |
||
48 | |||
49 | /** |
||
50 | * @Then :alias should be a registered form type |
||
51 | */ |
||
52 | public function shouldBeARegisteredFormType($alias) |
||
57 | |||
58 | /** |
||
59 | * @Then :alias should not be a registered form type |
||
60 | */ |
||
61 | public function shouldNotBeARegisteredFormType($alias) |
||
68 | |||
69 | /** |
||
70 | * @Then :alias should be a registered twig extension |
||
71 | */ |
||
72 | public function shouldBeARegisteredTwigExtension($alias) |
||
80 | |||
81 | /** |
||
82 | * @Then :alias should not be a registered twig extension |
||
83 | */ |
||
84 | public function shouldNotBeARegisteredTwigExtension($alias) |
||
92 | |||
93 | /** |
||
94 | * @Then :alias should be a registered validator |
||
95 | */ |
||
96 | public function shouldBeARegisteredValidator($alias) |
||
101 | |||
102 | /** |
||
103 | * @Then :alias should not be a registered validator |
||
104 | */ |
||
105 | public function shouldNotBeARegisteredValidator($alias) |
||
112 | |||
113 | /** |
||
114 | * @Then :id should be a registered service |
||
115 | */ |
||
116 | public function shouldBeARegisteredService($id) |
||
121 | |||
122 | /** |
||
123 | * @Then :id should not be a registered service |
||
124 | */ |
||
125 | public function shouldNotBeARegisteredService($id) |
||
132 | |||
133 | /** |
||
134 | * @When I visit :route page |
||
135 | * @When I visit :route page: |
||
136 | */ |
||
137 | public function visitRoute($route, TableNode $params = null) |
||
150 | |||
151 | /** |
||
152 | * @Then the file :file should contain :content |
||
153 | */ |
||
154 | public function theFileShouldContain($file, $content) |
||
160 | |||
161 | private function writeContent($path, $content = '') |
||
168 | } |
||
169 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.