You are here

public function ConvertCaseTest::testLowerCaseWithMultipleValues in Tamper 8

Test convert to lower case.

File

tests/src/Unit/Plugin/Tamper/ConvertCaseTest.php, line 61

Class

ConvertCaseTest
Tests the convert case plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testLowerCaseWithMultipleValues() {
  $this
    ->expectException(TamperException::class);
  $this
    ->expectExceptionMessage('Input should be a string.');
  $config = [
    ConvertCase::SETTING_OPERATION => 'strtolower',
  ];
  $plugin = new ConvertCase($config, 'convert_case', [], $this
    ->getMockSourceDefinition());
  $plugin
    ->tamper([
    'fOo',
    'BAR',
  ]);
}