1 | <?php |
||
15 | trait TagTrait |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var \Drupal\DrupalExtension\TagTraitHelper |
||
20 | */ |
||
21 | protected $tagTraitHelper; |
||
22 | |||
23 | /** |
||
24 | * Tracks the scopes that can be tagged. |
||
25 | * |
||
26 | * Tags can be put on features as well as scenarios. This hook will fire |
||
27 | * when a new feature or scenario is being executed and will keep track of |
||
28 | * both so that the tags can be inspected during the test. |
||
29 | * |
||
30 | * @param \Behat\Testwork\Hook\Scope\HookScope $scope |
||
31 | * |
||
32 | * @BeforeScenario |
||
33 | * @BeforeStep |
||
34 | */ |
||
35 | public function registerTagContainingScopes(HookScope $scope) |
||
45 | |||
46 | /** |
||
47 | * Returns the helper class as a singleton. |
||
48 | * |
||
49 | * @return \Drupal\DrupalExtension\TagTraitHelper |
||
50 | */ |
||
51 | protected function getTagTraitHelper() |
||
58 | |||
59 | /** |
||
60 | * Returns all tags for the current scenario and feature. |
||
61 | * |
||
62 | * @return string[] |
||
63 | */ |
||
64 | protected function getTags() |
||
70 | |||
71 | /** |
||
72 | * Checks whether the current scenario or feature has the given tag. |
||
73 | * |
||
74 | * @param string $tag |
||
75 | * |
||
76 | * @return bool |
||
77 | */ |
||
78 | protected function hasTag($tag) |
||
82 | } |
||
83 |
This check looks for access to methods that are not accessible from the current context.
If you need to make a method accessible to another context you can raise its visibility level in the defining class.