diff --git a/tests/phpunit/tests/formatting/urlencodeDeep.php b/tests/phpunit/tests/formatting/urlencodeDeep.php index 7783f3a002b05..5d64f3554a583 100644 --- a/tests/phpunit/tests/formatting/urlencodeDeep.php +++ b/tests/phpunit/tests/formatting/urlencodeDeep.php @@ -1,10 +1,14 @@ assertSame( $expected, urlencode_deep( $actual ) ); } + + /** + * Tests that rawurlencode_deep() encodes a single string. + * + * @ticket 65819 + */ + public function test_rawurlencode_deep_string() { + $this->assertSame( 'foo%20bar%26baz%3D1', rawurlencode_deep( 'foo bar&baz=1' ) ); + } + + /** + * Tests that urldecode_deep() decodes a single string. + * + * @ticket 65819 + */ + public function test_urldecode_deep_string() { + $this->assertSame( 'foo bar&baz=1', urldecode_deep( 'foo+bar%26baz%3D1' ) ); + $this->assertSame( 'foo bar', urldecode_deep( 'foo%20bar' ) ); + } }