18 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
34 $this->assertEquals($expected, $url);
43 'rebuild url without scheme' => [
44 parse_url(
'typo3.org/path/index.php'),
45 'typo3.org/path/index.php'
47 'rebuild url with scheme' => [
48 parse_url(
'http://typo3.org/path/index.php'),
49 'http://typo3.org/path/index.php'
51 'rebuild url with all properties' => [
52 parse_url(
'http://editor:secret@typo3.org:8080/path/index.php?query=data#fragment'),
53 'http://editor:secret@typo3.org:8080/path/index.php?query=data#fragment'
55 'url without username, but password' => [
73 $valueArray = [
'one' =>
'√',
'two' => 2];
76 'Empty input' => [
'foo', [],
''],
77 'String parameters' => [
'foo', $valueArray,
'foo%5Bone%5D=%E2%88%9A&foo%5Btwo%5D=2'],
78 'Nested array parameters' => [
'foo', [$valueArray],
'foo%5B0%5D%5Bone%5D=%E2%88%9A&foo%5B0%5D%5Btwo%5D=2'],
79 'Keep blank parameters' => [
'foo', [
'one' =>
'√',
''],
'foo%5Bone%5D=%E2%88%9A&foo%5B0%5D=']
104 $input = [
'one' =>
'√',
''];
105 $expected =
'foo%5Bone%5D=%E2%88%9A';
114 $input = [
'one' =>
'√',
''];
115 $expected =
'foo%5Bone%5D=%E2%88%9A&foo%5B0%5D=';
124 $input = [
'one' => [
'two' => [
'three' =>
'√']],
''];
125 $expected =
'foo%5Bone%5D%5Btwo%5D%5Bthree%5D=%E2%88%9A&foo%5B0%5D=';
144 $input = [
'one' =>
''];