1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
|
4
|
|
|
namespace Ciandt\Behat\PlaceholdersExtension\PlaceholderContainer; |
5
|
|
|
|
6
|
|
|
use Behat\Gherkin\Node\StepNode; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Description of DecoratedStepNode |
10
|
|
|
* |
11
|
|
|
* @author bwowk |
12
|
|
|
*/ |
13
|
|
|
class PlaceholderContainerStepNode extends StepNode implements PlaceholderContainer{ |
14
|
|
|
|
15
|
|
|
private $stepNode; |
16
|
|
|
|
17
|
|
|
private $variant; |
18
|
|
|
|
19
|
|
|
private $configKey; |
20
|
|
|
|
21
|
|
|
private $sectionKey; |
22
|
|
|
|
23
|
|
|
function __construct($stepNode,$configKey, $sectionKey, $variant) { |
|
|
|
|
24
|
|
|
$this->stepNode = $stepNode; |
25
|
|
|
$this->configKey = $configKey; |
26
|
|
|
$this->sectionKey = $sectionKey; |
27
|
|
|
$this->variant = $variant; |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
|
31
|
|
|
public function getArguments() { |
32
|
|
|
return $this->stepNode->getArguments(); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
public function getKeyword() { |
36
|
|
|
return $this->stepNode->getKeyword(); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
public function getKeywordType() { |
40
|
|
|
return $this->stepNode->getKeywordType(); |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
public function getLine() { |
44
|
|
|
return $this->stepNode->getLine(); |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
public function getNodeType() { |
48
|
|
|
return $this->stepNode->getNodeType(); |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
public function getText() { |
52
|
|
|
return $this->stepNode->getText(); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function getType() { |
56
|
|
|
return $this->stepNode->getType(); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function hasArguments() { |
60
|
|
|
return $this->stepNode->hasArguments(); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function getConfigKey() { |
64
|
|
|
return $this->configKey; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
public function getSectionKey() { |
68
|
|
|
return $this->sectionKey; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
public function getVariant() { |
72
|
|
|
return $this->variant; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
|
76
|
|
|
} |
77
|
|
|
|
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.