function UrlEncodeTest::doTransform

Same name and namespace 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 <a href="/api/drupal/core%21modules%21migrate%21src%21Plugin%21migrate%21process%21UrlEncode.php/class/UrlEncode/11.x" title="URL-encodes the input value." class="local">\Drupal\migrate\Plugin\migrate\process\UrlEncode</a> @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.