You are here

public function UrlEncodeTest::testUrlEncodeArray in Tamper 8

Tests url encoding of array input using the legacy method.

File

tests/src/Unit/Plugin/Tamper/UrlEncodeTest.php, line 46

Class

UrlEncodeTest
Tests the url encode plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testUrlEncodeArray() {
  $this
    ->expectException(TamperException::class);
  $this
    ->expectExceptionMessage('Input should be a string.');
  $config = [
    UrlEncode::SETTING_METHOD => 'urlencode',
  ];
  $plugin = new UrlEncode($config, 'url_encode', [], $this
    ->getMockSourceDefinition());
  $plugin
    ->tamper([
    'fOo',
    'BAR',
  ]);
}