mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-55072 behat: Cache themesuite and theme contexts
This commit is contained in:
parent
14f3abee2e
commit
6c1cc55d92
1 changed files with 9 additions and 3 deletions
|
@ -55,6 +55,11 @@ class behat_config_util {
|
||||||
*/
|
*/
|
||||||
private $themecontexts;
|
private $themecontexts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array list of all contexts in theme suite.
|
||||||
|
*/
|
||||||
|
private $themesuitecontexts;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array list of overridden theme contexts.
|
* @var array list of overridden theme contexts.
|
||||||
*/
|
*/
|
||||||
|
@ -1202,8 +1207,8 @@ class behat_config_util {
|
||||||
protected function get_behat_contexts_for_theme($theme) {
|
protected function get_behat_contexts_for_theme($theme) {
|
||||||
|
|
||||||
// If we already have this list then just return. This will not change by run.
|
// If we already have this list then just return. This will not change by run.
|
||||||
if (!empty($this->themecontexts[$theme])) {
|
if (!empty($this->themecontexts[$theme]) && !empty($this->themesuitecontexts)) {
|
||||||
return $this->themecontexts[$theme];
|
return array(array_keys($this->themecontexts[$theme]), $this->themesuitecontexts[$theme]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->overriddenthemescontexts)) {
|
if (empty($this->overriddenthemescontexts)) {
|
||||||
|
@ -1251,7 +1256,8 @@ class behat_config_util {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are only interested in the class name of context.
|
// We are only interested in the class name of context.
|
||||||
$this->themecontexts[$theme] = $themesuitecontexts;
|
$this->themesuitecontexts[$theme] = $themesuitecontexts;
|
||||||
|
$this->themecontexts[$theme] = $themecontexts;
|
||||||
|
|
||||||
return array(array_keys($themecontexts), $themesuitecontexts);
|
return array(array_keys($themecontexts), $themesuitecontexts);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue