diff --git a/modules/block/block.test b/modules/block/block.test index 88d0d36..c1afec4 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -753,7 +753,7 @@ class BlockTemplateSuggestionsUnitTest extends DrupalUnitTestCase { } /** - * Unit tests for hook_block_view_MODULE_DELTA_alter(). + * Tests for hook_block_view_MODULE_DELTA_alter(). */ class BlockViewModuleDeltaAlterWebTest extends DrupalWebTestCase { @@ -770,15 +770,15 @@ class BlockViewModuleDeltaAlterWebTest extends DrupalWebTestCase { } /** - * Test if hook_block_view_MODULE_DELTA_alter() is called, even if the delta - * contains a hyphen. + * Tests that the alter hook is called, even if the delta contains a hyphen. */ public function testBlockViewModuleDeltaAlter() { $block = new stdClass; $block->module = 'block_test'; $block->delta = 'test_underscore'; $block->title = ''; - $render = array_pop(_block_render_blocks(array('region' => $block))); + $render_array = _block_render_blocks(array('region' => $block)); + $render = array_pop($render_array); $test_underscore = $render->content['#markup']; $this->assertEqual($test_underscore, 'hook_block_view_MODULE_DELTA_alter', 'Found expected altered block content for delta with underscore'); @@ -786,7 +786,8 @@ class BlockViewModuleDeltaAlterWebTest extends DrupalWebTestCase { $block->module = 'block_test'; $block->delta = 'test-hyphen'; $block->title = ''; - $render = array_pop(_block_render_blocks(array('region' => $block))); + $render_array = _block_render_blocks(array('region' => $block)); + $render = array_pop($render_array); $test_hyphen = $render->content['#markup']; $this->assertEqual($test_hyphen, 'hook_block_view_MODULE_DELTA_alter', 'Hyphens (-) in block delta were replaced by underscore (_)'); }