You are here

public function DisplayInternalLogicTest::testBlockSorting in Layout 8.2

Tests block sorting within regions.

File

lib/Drupal/layout/Tests/DisplayInternalLogicTest.php, line 65
Definition of \Drupal\layout\Tests\DisplayInternalLogicTest.

Class

DisplayInternalLogicTest
Tests the API and internal logic offered by Displays.

Namespace

Drupal\layout\Tests

Code

public function testBlockSorting() {
  $expected = array(
    'left' => array(
      'block.test_block_3',
      'block.test_block_1',
    ),
    'right' => array(
      'block.test_block_2',
    ),
  );
  $this
    ->assertIdentical($this->twocol
    ->getSortedBlocksByRegion('left'), $expected['left']);
  $this
    ->assertIdentical($this->twocol
    ->getSortedBlocksByRegion('right'), $expected['right']);
  $this
    ->assertIdentical($this->twocol
    ->getAllSortedBlocks(), $expected);
}