You are here

public function BlockVisibilityTest::testTransformMultiplePagesWithFront in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockVisibilityTest::testTransformMultiplePagesWithFront()
  2. 9 core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockVisibilityTest::testTransformMultiplePagesWithFront()

@covers ::transform

File

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

Class

BlockVisibilityTest
Tests the block_visibility process plugin.

Namespace

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

Code

public function testTransformMultiplePagesWithFront() {
  $visibility = $this->plugin
    ->transform([
    1,
    "foo\n/bar\rbaz\r\n<front>",
    [],
  ], $this->migrateExecutable, $this->row, 'destination_property');
  $this
    ->assertSame('request_path', $visibility['request_path']['id']);
  $this
    ->assertFalse($visibility['request_path']['negate']);
  $this
    ->assertSame("/foo\n/bar\n/baz\n<front>", $visibility['request_path']['pages']);
}