MDL-57232 behat: Add blocks in boost theme

Currently behat in boost depend on blocks
so make sure we have them.
This commit is contained in:
Rajesh Taneja 2016-12-02 22:47:57 +08:00
parent 1acd568793
commit 54348ea6d7
No known key found for this signature in database
GPG Key ID: B363F7FB787F80E4
2 changed files with 4 additions and 4 deletions

View File

@ -108,9 +108,6 @@ class behat_util extends testing_util {
set_config('debug', DEBUG_DEVELOPER);
set_config('debugdisplay', 1);
// Force the navigation and settings blocks, even if the theme has made them optional.
set_config('undeletableblocktypes', 'navigation,settings');
// Disable some settings that are not wanted on test sites.
set_config('noemailever', 1);

View File

@ -387,7 +387,10 @@ class block_manager {
$requiredbythemeblocks = $PAGE->theme->requiredblocks;
}
if ($requiredbythemeblocks === false) {
// We need blocks for behat, till MDL-56614 gets in.
if (defined('BEHAT_SITE_RUNNING')) {
return array('navigation', 'settings');
} else if ($requiredbythemeblocks === false) {
return array('navigation', 'settings');
} else if ($requiredbythemeblocks === '') {
return array();