-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Remove old
Uri
tests as the Flow Uri impl is gone
- Loading branch information
Showing
2 changed files
with
54 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
namespace Neos\Flow\Tests\Unit\Http; | ||
|
||
/* | ||
* This file is part of the Neos.Flow package. | ||
* | ||
* (c) Contributors of the Neos Project - www.neos.io | ||
* | ||
* This package is Open Source Software. For the full copyright and license | ||
* information, please view the LICENSE file which was distributed with this | ||
* source code. | ||
*/ | ||
|
||
use GuzzleHttp\Psr7\Uri; | ||
use Neos\Flow\Http\UriHelper; | ||
use Neos\Flow\Tests\UnitTestCase; | ||
|
||
class UriHelperTest extends UnitTestCase | ||
{ | ||
/** @test */ | ||
public function specificationWithoutQueryParametersDontModifyTheUri() | ||
{ | ||
self::assertEquals( | ||
new Uri('http://localhost/index?param1=foo¶m2[0]=bar'), | ||
UriHelper::withAdditionalQueryParameters(new Uri('http://localhost/index?param1=foo¶m2[0]=bar'), []) | ||
); | ||
} | ||
|
||
/** @test */ | ||
public function queryParametersAddedToUriWithoutQueryParameters() | ||
{ | ||
self::assertEquals( | ||
new Uri('http://localhost/index?param=123'), | ||
UriHelper::withAdditionalQueryParameters(new Uri('http://localhost/index'), ['param' => 123]) | ||
); | ||
} | ||
|
||
/** @test */ | ||
public function nestedQueryParametersAreMergedCorrectly() | ||
{ | ||
self::assertEquals( | ||
new Uri('http://localhost/index?param1=foo¶m2[a]=bar¶m2[b]=huhu¶m3=123'), | ||
UriHelper::withAdditionalQueryParameters( | ||
new Uri('http://localhost/index?param1=foo¶m2[a]=bar'), | ||
[ | ||
'param2' => [ | ||
'b' => 'huhu' | ||
], | ||
'param3' => 123, | ||
] | ||
) | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.