1 | <?php |
||
15 | class FeatureContext implements Context, SnippetAcceptingContext |
||
|
|||
16 | { |
||
17 | private $dir; |
||
18 | |||
19 | /** |
||
20 | * Initializes context. |
||
21 | * |
||
22 | * Every scenario gets its own context instance. |
||
23 | * You can also pass arbitrary arguments to the |
||
24 | * context constructor through behat.yml. |
||
25 | */ |
||
26 | public function __construct() |
||
29 | |||
30 | /** |
||
31 | * @Given there is :dir directory in root of the application |
||
32 | */ |
||
33 | public function thereIsDirectoryInRootOfTheApplication($dir) |
||
40 | |||
41 | /** |
||
42 | * @Given I am in a root directory of application |
||
43 | */ |
||
44 | public function iAmInARootDirectoryOfApplication() |
||
48 | |||
49 | /** |
||
50 | * @Given I run :command |
||
51 | */ |
||
52 | public function iRun($command) |
||
56 | |||
57 | /** |
||
58 | * @Then I see the file witch name contains :fileName |
||
59 | */ |
||
60 | public function iSeeTheFileWitchNameContains($fileName) |
||
68 | |||
69 | /** |
||
70 | * @Then this file body contains: |
||
71 | */ |
||
72 | public function thisFileBodyContains(PyStringNode $string) |
||
83 | |||
84 | /** |
||
85 | * @AfterScenario |
||
86 | */ |
||
87 | public function deleteMigrations(AfterScenarioScope $scope) |
||
92 | } |
||
93 |
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.