1 | <?php |
||
9 | class FeatureContext implements Context |
||
|
|||
10 | { |
||
11 | private $testDir; |
||
12 | private $zBinary; |
||
13 | private $zBinaryPath; |
||
14 | private $packageBinary; |
||
15 | private $response; |
||
16 | |||
17 | |||
18 | /** |
||
19 | * Initializes context. |
||
20 | * |
||
21 | * Every scenario gets its own context instance. |
||
22 | * You can also pass arbitrary arguments to the |
||
23 | * context constructor through behat.yml. |
||
24 | */ |
||
25 | public function __construct() |
||
35 | |||
36 | |||
37 | /** |
||
38 | * @Given /^I am in (?P<type>a|the) test directory$/ |
||
39 | */ |
||
40 | public function iAmInATestDirectory($type) |
||
52 | |||
53 | |||
54 | /** |
||
55 | * @Given /^there is (?:a )?file "(?P<file>[^"]+)"$/ |
||
56 | */ |
||
57 | public function thereIsFile($file, PyStringNode $string) |
||
66 | |||
67 | |||
68 | /** |
||
69 | * @Given /^there is an executable file "([^"]*)" with a shebang pointing to Z$/ |
||
70 | */ |
||
71 | public function thereIsAFileWithAShebangPointingToZ($file, PyStringNode $string) |
||
83 | |||
84 | |||
85 | /** |
||
86 | * @When /^I run "z ([^"]*)"$/ |
||
87 | */ |
||
88 | public function iRunZ($cmd) |
||
92 | |||
93 | /** |
||
94 | * @When /^I run "package ([^"]*)"$/ |
||
95 | */ |
||
96 | public function iRunPackage($cmd) |
||
100 | |||
101 | /** |
||
102 | * @When /^I run ".\/([^"]*)"$/ |
||
103 | */ |
||
104 | public function iRunALocalScript($cmd) |
||
108 | |||
109 | /** |
||
110 | * @Then /^I should (?P<negate>not )?see text matching "(?P<pattern>[^"]*)"$/ |
||
111 | */ |
||
112 | public function iShouldSeeTextMatching($pattern, $negate = false) |
||
121 | } |
||
122 |
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.