Skip to content

Commit

Permalink
TASK: Remove old Uri tests as the Flow Uri impl is gone
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Feb 14, 2024
1 parent 77f6135 commit 95537db
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 227 deletions.
54 changes: 54 additions & 0 deletions Neos.Flow/Tests/Unit/Http/UriHelperTest.php
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&param2[0]=bar'),
UriHelper::withAdditionalQueryParameters(new Uri('http://localhost/index?param1=foo&param2[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&param2[a]=bar&param2[b]=huhu&param3=123'),
UriHelper::withAdditionalQueryParameters(
new Uri('http://localhost/index?param1=foo&param2[a]=bar'),
[
'param2' => [
'b' => 'huhu'
],
'param3' => 123,
]
)
);
}
}
227 changes: 0 additions & 227 deletions Neos.Flow/Tests/Unit/Http/UriTest.php

This file was deleted.

0 comments on commit 95537db

Please sign in to comment.