public function FeedsTamperEncodeDecodeTestCase::test in Feeds Tamper 7
File
- tests/
feeds_tamper_plugins.test, line 1195 - Unit tests for feeds tamper plugins.
Class
- FeedsTamperEncodeDecodeTestCase
- Tests for the Tamper plugin 'encode'.
Code
public function test() {
$this
->execute(array(), 'a:0:{}', array(
'mode' => 'serialize',
));
$this
->execute('a:0:{}', array(), array(
'mode' => 'unserialize',
));
$this
->execute('abcdef 123 @#`|\\"$%&/()=?\'^*', 's:28:"abcdef 123 @#`|\\"$%&/()=?\'^*";', array(
'mode' => 'serialize',
));
$this
->execute('s:28:"abcdef 123 @#`|\\"$%&/()=?\'^*";', 'abcdef 123 @#`|\\"$%&/()=?\'^*', array(
'mode' => 'unserialize',
));
$this
->execute('abcdef 123 @#`|\\"$%&/()=?\'^*', 'YWJjZGVmIDEyMyBAI2B8XCIkJSYvKCk9PydeKg==', array(
'mode' => 'base64_encode',
));
$this
->execute('YWJjZGVmIDEyMyBAI2B8XCIkJSYvKCk9PydeKg==', 'abcdef 123 @#`|\\"$%&/()=?\'^*', array(
'mode' => 'base64_decode',
));
}