1 layout.test | protected LayoutBlockUsageTestCase::checkBlockUsage($delta, $layout, $position) |
Checks block usage.
File
- core/
modules/ layout/ tests/ layout.test, line 3165 - Tests for the Layout module.
Class
Code
protected function checkBlockUsage($delta, $layout, $position) {
backdrop_static_reset('layout_get_block_usage');
layout_reset_caches();
module_load_include('inc', 'layout', 'layout.admin');
$usage = layout_get_block_usage();
$this->assertTrue(isset($usage['system'][$delta][$layout][$position]), 'Block usage returned correctly. Block found in array.');
if (isset($usage['system'][$delta][$layout][$position])) {
return count($usage['system'][$delta][$layout][$position]);
}
return FALSE;
}