MDL-58040 blocklib: never use global in block manager class

This switches everything to ->page, including coverting static method to real one.
This commit is contained in:
Tim Hunt
2017-02-21 15:19:55 +00:00
parent 1a754e8446
commit 6fef2ab3db
2 changed files with 8 additions and 10 deletions
+1 -1
View File
@@ -598,7 +598,7 @@ class core_blocklib_testcase extends advanced_testcase {
// Assert that protecting a block does not make it auto-created.
$this->assertCount(2, $blocks);
$requiredbytheme = block_manager::get_required_by_theme_block_types();
$requiredbytheme = $blockmanager->get_required_by_theme_block_types();
foreach ($requiredbytheme as $blockname) {
$instance = $DB->get_record('block_instances', array('blockname' => $blockname));
$this->assertEquals(1, $instance->requiredbytheme);