function BlockVisibilityTest::testTransformSinglePageWithFront

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

@covers ::transform

File

core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php, line 51

Class

BlockVisibilityTest
Tests the block_visibility process plugin.

Namespace

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

Code

public function testTransformSinglePageWithFront() : void {
    $visibility = $this->plugin
        ->transform([
        0,
        '<front>',
        [],
    ], $this->migrateExecutable, $this->row, 'destination_property');
    $this->assertSame('request_path', $visibility['request_path']['id']);
    $this->assertTrue($visibility['request_path']['negate']);
    $this->assertSame('<front>', $visibility['request_path']['pages']);
}

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