public function FeedsTamperURLencodeTestCase::test in Feeds Tamper 7
File
- tests/
feeds_tamper_plugins.test, line 1126 - Unit tests for feeds tamper plugins.
Class
- FeedsTamperURLencodeTestCase
- Tests for urlencode.inc
Code
public function test() {
$settings = array(
'method' => 'legacy',
);
$this
->execute('$ & < > ? ; # : = , " \' ~ + %', '%24+%26+%3C+%3E+%3F+%3B+%23+%3A+%3D+%2C+%22+%27+%7E+%2B+%25', $settings);
$this
->execute('String with spaces', 'String+with+spaces', $settings);
$this
->execute('special chars: &%*', 'special+chars%3A+%26%25%2A', $settings);
$settings = array(
'method' => 'raw',
);
$this
->execute('$ & < > ? ; # : = , " \' ~ + %', '%24%20%26%20%3C%20%3E%20%3F%20%3B%20%23%20%3A%20%3D%20%2C%20%22%20%27%20~%20%2B%20%25', $settings);
$this
->execute('String with spaces', 'String%20with%20spaces', $settings);
$this
->execute('special chars: &%*', 'special%20chars%3A%20%26%25%2A', $settings);
}