diff --git a/core/modules/layout/lib/Drupal/layout/Tests/DisplayInternalLogicTest.php b/core/modules/layout/lib/Drupal/layout/Tests/DisplayInternalLogicTest.php index 07a77bf..16922f8 100644 --- a/core/modules/layout/lib/Drupal/layout/Tests/DisplayInternalLogicTest.php +++ b/core/modules/layout/lib/Drupal/layout/Tests/DisplayInternalLogicTest.php @@ -64,8 +64,13 @@ public function setUp() { */ public function testBlockSorting() { $expected = array( - 'left' => array('block.test_block_3', 'block.test_block_1'), - 'right' => array('block.test_block_2'), + 'left' => array( + 'block.test_block_3' => array('region' => 'left', 'region-type' => 'content', 'weight' => -100), + 'block.test_block_1' => array('region' => 'left', 'region-type' => 'content', 'weight' => 100), + ), + 'right' => array( + 'block.test_block_2' => array('region' => 'right', 'region-type' => 'aside', 'weight' => 0), + ), ); $this->assertIdentical($this->twocol->getSortedBlocksByRegion('left'), $expected['left']); $this->assertIdentical($this->twocol->getSortedBlocksByRegion('right'), $expected['right']); @@ -84,7 +89,11 @@ public function testBlockMapping() { // Remap from twocol to onecol. All blocks are expected to move to the one // and only region and be sorted by their original weights. $expected = array( - 'middle' => array('block.test_block_3', 'block.test_block_2', 'block.test_block_1'), + 'middle' => array( + 'block.test_block_3' => array('region' => 'middle', 'region-type' => 'content', 'weight' => -100), + 'block.test_block_2' => array('region' => 'middle', 'region-type' => 'aside', 'weight' => 0), + 'block.test_block_1' => array('region' => 'middle', 'region-type' => 'content', 'weight' => 100), + ), ); $two_to_one = clone($this->twocol); $two_to_one->remapToLayout($this->onecol->getLayoutInstance()); @@ -94,7 +103,10 @@ public function testBlockMapping() { // region type, and twocol's 'left' region has that type, the blocks are // expected to move to there and be sorted by their original weights. $expected = array( - 'left' => array('block.test_block_2', 'block.test_block_1'), + 'left' => array( + 'block.test_block_2' => array('region' => 'left', 'region-type' => 'content', 'weight' => -100), + 'block.test_block_1' => array('region' => 'left', 'region-type' => 'content', 'weight' => 100), + ), 'right' => array(), ); $one_to_two = clone($this->onecol); @@ -110,8 +122,13 @@ public function testBlockMapping() { // region with that type, so it is expected to be mapped to twocol's // first region, which is 'left'. $expected = array( - 'left' => array('block.test_block_1', 'block.test_block_3'), - 'right' => array('block.test_block_2'), + 'left' => array( + 'block.test_block_1' => array('region-type' => 'content', 'weight' => -100, 'region' => 'left'), + 'block.test_block_3' => array('region-type' => 'nav', 'weight' => 0, 'region' => 'left'), + ), + 'right' => array( + 'block.test_block_2' => array('region-type' => 'aside', 'weight' => -100, 'region' => 'right'), + ), ); $unbound_to_twocol = $this->unbound->generateDisplay($this->twocol->getLayoutInstance(), 'unbound_to_twocol'); $this->assertTrue($unbound_to_twocol instanceof Display, 'Binding the unbound display successfully created a Display object');