1 | <?php |
||
16 | abstract class DrupalSubContextBase extends RawDrupalContext implements DrupalSubContextInterface { |
||
17 | |||
18 | /** |
||
19 | * The Drupal Driver Manager. |
||
20 | * |
||
21 | * @var \Drupal\DrupalDriverManager $drupal |
||
22 | */ |
||
23 | protected $drupal; |
||
24 | |||
25 | /** |
||
26 | * Constructs a DrupalSubContextBase object. |
||
27 | * |
||
28 | * @param \Drupal\DrupalDriverManager $drupal |
||
29 | * The Drupal driver manager. |
||
30 | */ |
||
31 | public function __construct(DrupalDriverManager $drupal) { |
||
34 | |||
35 | /** |
||
36 | * Get the currently logged in user from DrupalContext. |
||
37 | */ |
||
38 | protected function getUser() { |
||
47 | |||
48 | /** |
||
49 | * Returns the Behat context that corresponds with the given class name. |
||
50 | * |
||
51 | * This is inspired by InitializedContextEnvironment::getContext() but also |
||
52 | * returns subclasses of the given class name. This allows us to retrieve for |
||
53 | * example DrupalContext even if it is overridden in a project. |
||
54 | * |
||
55 | * @param string $class |
||
56 | * A fully namespaced class name. |
||
57 | * |
||
58 | * @return \Behat\Behat\Context\Context|false |
||
59 | * The requested context, or FALSE if the context is not registered. |
||
60 | */ |
||
61 | protected function getContext($class) { |
||
72 | |||
73 | } |
||
74 |