You are here

public function EncodeTest::testSerializeCrazyString in Tamper 8

Test serialize on complex string.

File

tests/src/Unit/Plugin/Tamper/EncodeTest.php, line 50

Class

EncodeTest
Tests the encode / decode plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testSerializeCrazyString() {
  $config = [
    Encode::SETTING_MODE => 'serialize',
  ];
  $plugin = new Encode($config, 'encode', [], $this
    ->getMockSourceDefinition());
  $this
    ->assertEquals('s:28:"abcdef 123 @#`|\\"$%&/()=?\'^*";', $plugin
    ->tamper('abcdef 123 @#`|\\"$%&/()=?\'^*'));
}