1 | <?php |
||
18 | class OutlineNode implements ScenarioInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $title; |
||
24 | /** |
||
25 | * @var string[] |
||
26 | */ |
||
27 | private $tags; |
||
28 | /** |
||
29 | * @var StepNode[] |
||
30 | */ |
||
31 | private $steps; |
||
32 | /** |
||
33 | * @var ExampleTableNode |
||
34 | */ |
||
35 | private $table; |
||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $keyword; |
||
40 | /** |
||
41 | * @var integer |
||
42 | */ |
||
43 | private $line; |
||
44 | /** |
||
45 | * @var null|ExampleNode[] |
||
46 | */ |
||
47 | private $examples; |
||
48 | |||
49 | /** |
||
50 | * Initializes outline. |
||
51 | * |
||
52 | * @param null|string $title |
||
53 | * @param string[] $tags |
||
54 | * @param StepNode[] $steps |
||
55 | * @param ExampleTableNode $table |
||
56 | * @param string $keyword |
||
57 | * @param integer $line |
||
58 | */ |
||
59 | 34 | public function __construct( |
|
74 | |||
75 | /** |
||
76 | * Returns node type string |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | public function getNodeType() |
||
84 | |||
85 | /** |
||
86 | * Returns outline title. |
||
87 | * |
||
88 | * @return null|string |
||
89 | */ |
||
90 | 7 | public function getTitle() |
|
94 | |||
95 | /** |
||
96 | * Checks if outline is tagged with tag. |
||
97 | * |
||
98 | * @param string $tag |
||
99 | * |
||
100 | * @return Boolean |
||
101 | */ |
||
102 | public function hasTag($tag) |
||
106 | |||
107 | /** |
||
108 | * Checks if outline has tags (both inherited from feature and own). |
||
109 | * |
||
110 | * @return Boolean |
||
111 | */ |
||
112 | 1 | public function hasTags() |
|
116 | |||
117 | /** |
||
118 | * Returns outline tags (including inherited from feature). |
||
119 | * |
||
120 | * @return string[] |
||
121 | */ |
||
122 | 3 | public function getTags() |
|
126 | |||
127 | /** |
||
128 | * Checks if outline has steps. |
||
129 | * |
||
130 | * @return Boolean |
||
131 | */ |
||
132 | 1 | public function hasSteps() |
|
136 | |||
137 | /** |
||
138 | * Returns outline steps. |
||
139 | * |
||
140 | * @return StepNode[] |
||
141 | */ |
||
142 | 6 | public function getSteps() |
|
146 | |||
147 | /** |
||
148 | * Checks if outline has examples. |
||
149 | * |
||
150 | * @return Boolean |
||
151 | */ |
||
152 | 10 | public function hasExamples() |
|
156 | |||
157 | /** |
||
158 | * Returns examples table. |
||
159 | * |
||
160 | * @return ExampleTableNode |
||
161 | */ |
||
162 | 5 | public function getExampleTable() |
|
166 | |||
167 | /** |
||
168 | * Returns list of examples for the outline. |
||
169 | * |
||
170 | * @return ExampleNode[] |
||
171 | */ |
||
172 | 5 | public function getExamples() |
|
176 | |||
177 | /** |
||
178 | * Returns outline keyword. |
||
179 | * |
||
180 | * @return string |
||
181 | */ |
||
182 | 2 | public function getKeyword() |
|
186 | |||
187 | /** |
||
188 | * Returns outline declaration line number. |
||
189 | * |
||
190 | * @return integer |
||
191 | */ |
||
192 | 15 | public function getLine() |
|
196 | |||
197 | /** |
||
198 | * Creates examples for this outline using examples table. |
||
199 | * |
||
200 | * @return ExampleNode[] |
||
201 | */ |
||
202 | 5 | protected function createExamples() |
|
218 | } |
||
219 |