You are here

public function EncodeTest::testUnserializeCrazyString in Tamper 8

Test unserialize on complex string.

File

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

Class

EncodeTest
Tests the encode / decode plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

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