Skip to content

Commit

Permalink
Merge pull request #1 from plesk/enable-psr-http-message-1
Browse files Browse the repository at this point in the history
Fix enable old psr/http-message
  • Loading branch information
sibprogrammer committed Jun 29, 2023
2 parents e16d2c9 + fc1bc46 commit cee6577
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion composer.json
Expand Up @@ -37,7 +37,6 @@
"react/socket": "^1.13.0",
"react/event-loop": "^1.4.0",
"guzzlehttp/psr7": "^2.5.0",
"psr/http-message": "^2.0",
"symfony/http-foundation": "^5.4.24 || ^6.0",
"symfony/routing": "^5.4.22 || ^6.0"
},
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/Http/RouterTest.php
Expand Up @@ -28,11 +28,19 @@ public function setUp(): void
->expects($this->any())
->method('getQuery')
->will($this->returnValue('foo=bar&baz=qux'));
$this->uri
->expects($this->any())
->method('getHost')
->will($this->returnValue('localhost'));
$this->req = $this->createMock('\Psr\Http\Message\RequestInterface');
$this->req
->expects($this->any())
->method('getUri')
->will($this->returnValue($this->uri));
$this->req
->expects($this->any())
->method('getMethod')
->will($this->returnValue('GET'));
$this->matcher = $this->createMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface');
$this->matcher
->expects($this->any())
Expand Down Expand Up @@ -154,6 +162,7 @@ public function testQueryParams()

return true;
}))->will($this->returnSelf());
$request->expects($this->any())->method('getMethod')->will($this->returnValue('GET'));

$router = new Router($this->matcher);
$router->onOpen($conn, $request);
Expand Down

0 comments on commit cee6577

Please sign in to comment.