1 | <?php |
||
26 | class FeatureContext implements Context |
||
|
|||
27 | { |
||
28 | protected $engine; |
||
29 | |||
30 | protected $customer; |
||
31 | protected $price; |
||
32 | protected $action; |
||
33 | protected $charges; |
||
34 | protected $date; |
||
35 | |||
36 | /** |
||
37 | * Initializes context. |
||
38 | */ |
||
39 | public function __construct() |
||
43 | |||
44 | /** |
||
45 | * @Given /(\S+) (\S+) price is ([0-9.]+) (\w+) per ([0-9.]+) (\w+)/ |
||
46 | */ |
||
47 | public function priceIs($target, $type, $sum, $currency, $amount, $unit) |
||
55 | |||
56 | /** |
||
57 | * @Given /action is (\S+) (\w+) ([0-9.]+) (\S+)/ |
||
58 | */ |
||
59 | public function actionIs($target, $type, $amount, $unit) |
||
67 | |||
68 | /** |
||
69 | * @Given /formula is (.+)/ |
||
70 | */ |
||
71 | public function formulaIs($formula) |
||
75 | |||
76 | protected function getFormulaEngine() |
||
84 | |||
85 | /** |
||
86 | * @When /date is ([0-9.-]+)/ |
||
87 | */ |
||
88 | public function dateIs($date) |
||
92 | |||
93 | /** |
||
94 | * @Then /(\w+) charge is (\S+)? ?([0-9.]+)? ?([A-Z]{3})?/ |
||
95 | */ |
||
96 | public function chargeIs($numeral, $type = null, $sum = null, $currency = null) |
||
105 | |||
106 | public function assertCharge($type, $sum, $currency, $charge) |
||
119 | |||
120 | protected $numerals = [ |
||
121 | 'first' => 1, |
||
122 | 'second' => 2, |
||
123 | 'third' => 3, |
||
124 | 'fourth' => 4, |
||
125 | 'fifth' => 5, |
||
126 | ]; |
||
127 | |||
128 | public function ensureNo($numeral) |
||
136 | } |
||
137 |
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.