You are here

public function UrlEncodeTest::testRawUrlEncodeNumeric in Tamper 8

Tests url encoding of number input using the raw method.

File

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

Class

UrlEncodeTest
Tests the url encode plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

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