1 | <?php |
||
23 | class CucumberKeywords extends ArrayKeywords |
||
24 | { |
||
25 | /** |
||
26 | * Initializes holder with yaml string OR file. |
||
27 | * |
||
28 | * @param string $yaml Yaml string or file path |
||
29 | */ |
||
30 | 63 | public function __construct($yaml) |
|
55 | |||
56 | /** |
||
57 | * Returns Feature keywords (splitted by "|"). |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | 61 | public function getGivenKeywords() |
|
65 | |||
66 | /** |
||
67 | * Returns When keywords (splitted by "|"). |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | 61 | public function getWhenKeywords() |
|
75 | |||
76 | /** |
||
77 | * Returns Then keywords (splitted by "|"). |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | 61 | public function getThenKeywords() |
|
85 | |||
86 | /** |
||
87 | * Returns And keywords (splitted by "|"). |
||
88 | * |
||
89 | * @return string |
||
90 | */ |
||
91 | 61 | public function getAndKeywords() |
|
95 | |||
96 | /** |
||
97 | * Returns But keywords (splitted by "|"). |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | 61 | public function getButKeywords() |
|
105 | |||
106 | /** |
||
107 | * Trim *| from the begining of the list. |
||
108 | * |
||
109 | * @param string $keywordsString Keywords string |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | 61 | private function prepareStepString($keywordsString) |
|
121 | } |
||
122 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: