mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-58428 behat: Check parent themes for Behat override steps.
Behat will now look at the current themes' parents for Behat ovveride steps. If found we will use the steps replacing the Moodle core steps.
This commit is contained in:
parent
e3652936f3
commit
4aefaf653b
10 changed files with 110 additions and 131 deletions
|
@ -90,6 +90,13 @@ class behat_context_helper {
|
|||
* @return behat_base
|
||||
*/
|
||||
public static function get($classname) {
|
||||
$contexts = self::$environment->getContexts();
|
||||
|
||||
foreach ($contexts as $context) {
|
||||
if (is_a($context, $classname)) {
|
||||
return $context;
|
||||
}
|
||||
}
|
||||
|
||||
$suitename = self::$environment->getSuite()->getName();
|
||||
// If default suite, then get the default theme name.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue