You are here

public function EncodeTest::testBase64Decode in Tamper 8

Test base64_decode.

File

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

Class

EncodeTest
Tests the encode / decode plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

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