You are here

public function MigrateBlockTest::assertEntity in Zircon Profile 8.0

Same name in this branch
  1. 8.0 core/modules/block/src/Tests/Migrate/d6/MigrateBlockTest.php \Drupal\block\Tests\Migrate\d6\MigrateBlockTest::assertEntity()
  2. 8.0 core/modules/block/src/Tests/Migrate/d7/MigrateBlockTest.php \Drupal\block\Tests\Migrate\d7\MigrateBlockTest::assertEntity()
Same name and namespace in other branches
  1. 8 core/modules/block/src/Tests/Migrate/d6/MigrateBlockTest.php \Drupal\block\Tests\Migrate\d6\MigrateBlockTest::assertEntity()

Asserts various aspects of a block.

Parameters

string $id: The block ID.

array $visibility: The block visibility settings.

string $region: The display region.

string $theme: The theme.

string $weight: The block weight.

1 call to MigrateBlockTest::assertEntity()
MigrateBlockTest::testBlockMigration in core/modules/block/src/Tests/Migrate/d6/MigrateBlockTest.php
Tests the block migration.

File

core/modules/block/src/Tests/Migrate/d6/MigrateBlockTest.php, line 73
Contains \Drupal\block\Tests\Migrate\d6\MigrateBlockTest.

Class

MigrateBlockTest
Tests migration of blocks to configuration entities.

Namespace

Drupal\block\Tests\Migrate\d6

Code

public function assertEntity($id, $visibility, $region, $theme, $weight) {
  $block = Block::load($id);
  $this
    ->assertTrue($block instanceof Block);
  $this
    ->assertIdentical($visibility, $block
    ->getVisibility());
  $this
    ->assertIdentical($region, $block
    ->getRegion());
  $this
    ->assertIdentical($theme, $block
    ->getTheme());
  $this
    ->assertIdentical($weight, $block
    ->getWeight());
}