function UrlEncodeTest::doTransform

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php \Drupal\Tests\migrate\Unit\process\UrlEncodeTest::doTransform()
  2. 8.9.x core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php \Drupal\Tests\migrate\Unit\process\UrlEncodeTest::doTransform()
  3. 10 core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php \Drupal\Tests\migrate\Unit\process\UrlEncodeTest::doTransform()

Perform the urlencode process plugin over the given value.

Parameters

string $value: URL to be encoded.

Return value

string Encoded URL.

1 call to UrlEncodeTest::doTransform()
UrlEncodeTest::testUrls in core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php
Cover various encoding scenarios. @dataProvider urlDataProvider

File

core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php, line 59

Class

UrlEncodeTest
@coversDefaultClass \Drupal\migrate\Plugin\migrate\process\UrlEncode @group file

Namespace

Drupal\Tests\migrate\Unit\process

Code

protected function doTransform($value) {
    $executable = new MigrateExecutable($this->getMigration());
    $row = new Row();
    return (new UrlEncode([], 'urlencode', []))->transform($value, $executable, $row, 'foo');
}

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