You are here

public function EncodeTest::testUnserializeArray in Tamper 8

Test unserialize.

File

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

Class

EncodeTest
Tests the encode / decode plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testUnserializeArray() {
  $config = [
    Encode::SETTING_MODE => 'unserialize',
  ];
  $plugin = new Encode($config, 'encode', [], $this
    ->getMockSourceDefinition());
  $this
    ->assertEquals([], $plugin
    ->tamper('a:0:{}'));
}