function BlockRegionTest::testTransformSameThemeRegionExists

Same name and namespace in other branches
  1. 9 core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockRegionTest::testTransformSameThemeRegionExists()
  2. 8.9.x core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockRegionTest::testTransformSameThemeRegionExists()
  3. 11.x core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockRegionTest::testTransformSameThemeRegionExists()

Tests transforming a block with the same theme and an existing region.

If the source and destination themes are identical, the region should only be passed through if it actually exists in the destination theme.

@covers ::transform

File

core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php, line 60

Class

BlockRegionTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21block%21src%21Plugin%21migrate%21process%21BlockRegion.php/class/BlockRegion/10" title="BlockRegion" class="local">\Drupal\block\Plugin\migrate\process\BlockRegion</a> @group block

Namespace

Drupal\Tests\block\Unit\Plugin\migrate\process

Code

public function testTransformSameThemeRegionExists() {
    $this->assertSame('triptych_second', $this->transform([
        'bartik',
        'bartik',
        'triptych_middle',
    ]));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.