1 | <?php |
||
19 | class FeatureContext implements Context |
||
|
|||
20 | { |
||
21 | /** |
||
22 | * Initializes context. |
||
23 | */ |
||
24 | public function __construct() |
||
28 | |||
29 | /** |
||
30 | * @Given /(\S+) (\S+) price is ([0-9.]+) (\w+) per ([0-9.]+) (\w+)/ |
||
31 | */ |
||
32 | public function priceIs($target, $type, $sum, $currency, $amount, $unit) |
||
40 | |||
41 | /** |
||
42 | * @Given /action is (\S+) (\w+) ([0-9.]+) (\S+)/ |
||
43 | */ |
||
44 | public function actionIs($target, $type, $amount, $unit) |
||
52 | |||
53 | /** |
||
54 | * @Given /formula is (.+)/ |
||
55 | */ |
||
56 | public function formulaIs($formula) |
||
60 | |||
61 | /** |
||
62 | * @When /date is ([0-9.-]+)/ |
||
63 | */ |
||
64 | public function dateIs($date) |
||
68 | |||
69 | /** |
||
70 | * @Then /(\w+) charge is (\S+)? ?([0-9.]+)? ?([A-Z]{3})?/ |
||
71 | */ |
||
72 | public function chargeIs($numeral, $type = null, $sum = null, $currency = null) |
||
79 | |||
80 | protected $numerals = [ |
||
81 | 'first' => 1, |
||
82 | 'second' => 2, |
||
83 | 'third' => 3, |
||
84 | 'fourth' => 4, |
||
85 | 'fifth' => 5, |
||
86 | ]; |
||
87 | |||
88 | public function ensureNo($numeral) |
||
96 | } |
||
97 |
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.