Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/ServerRequest/DecodeQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class DecodeQueryTest extends TestCase
{
use BlackBox;

public function testDecodeQueryFromUrl()
public function testDecodeQueryFromUrl(): BlackBox\Proof
{
$this
return $this
->forAll(
Set::of(...Method::cases()),
Set::of(...ProtocolVersion::cases()),
)
->then(function($method, $protocol) {
->prove(function($method, $protocol) {
$request = Request::of(
Url::of('/?some[key]=value&foo=bar'), // without the first // it interprets the host as the scheme
$method,
Expand Down
30 changes: 15 additions & 15 deletions tests/ServerRequest/TransformTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class TransformTest extends TestCase
{
use BlackBox;

public function testInjectHostInUrlFromHeader()
public function testInjectHostInUrlFromHeader(): BlackBox\Proof
{
$this
return $this
->forAll(
Set::of(...Method::cases()),
Set::of(...ProtocolVersion::cases()),
)
->then(function($method, $protocol) {
->prove(function($method, $protocol) {
$request = Request::of(
Url::of('/foo'),
$method,
Expand All @@ -52,14 +52,14 @@ public function testInjectHostInUrlFromHeader()
});
}

public function testDoesntInjectHostInUrlFromHeaderIfAlreadyInUrl()
public function testDoesntInjectHostInUrlFromHeaderIfAlreadyInUrl(): BlackBox\Proof
{
$this
return $this
->forAll(
Set::of(...Method::cases()),
Set::of(...ProtocolVersion::cases()),
)
->then(function($method, $protocol) {
->prove(function($method, $protocol) {
$request = Request::of(
Url::of('//example.com:443/foo'), // without the first // it interprets the host as the scheme
$method,
Expand All @@ -78,14 +78,14 @@ public function testDoesntInjectHostInUrlFromHeaderIfAlreadyInUrl()
});
}

public function testInjectUserInformationInUrlFromHeader()
public function testInjectUserInformationInUrlFromHeader(): BlackBox\Proof
{
$this
return $this
->forAll(
Set::of(...Method::cases()),
Set::of(...ProtocolVersion::cases()),
)
->then(function($method, $protocol) {
->prove(function($method, $protocol) {
$request = Request::of(
Url::of('/foo'),
$method,
Expand All @@ -107,9 +107,9 @@ public function testInjectUserInformationInUrlFromHeader()
});
}

public function testDoesntInjectUserInformationInUrlFromHeaderIfNotBasicScheme()
public function testDoesntInjectUserInformationInUrlFromHeaderIfNotBasicScheme(): BlackBox\Proof
{
$this
return $this
->forAll(
Set::of(...Method::cases()),
Set::of(...ProtocolVersion::cases()),
Expand All @@ -118,7 +118,7 @@ public function testDoesntInjectUserInformationInUrlFromHeaderIfNotBasicScheme()
->atLeast(1),
Set::strings(),
)
->then(function($method, $protocol, $scheme, $token) {
->prove(function($method, $protocol, $scheme, $token) {
$request = Request::of(
Url::of('/foo'),
$method,
Expand All @@ -137,14 +137,14 @@ public function testDoesntInjectUserInformationInUrlFromHeaderIfNotBasicScheme()
});
}

public function testDoesntInjectUserInformationInUrlFromHeaderIfAlreadyInUrl()
public function testDoesntInjectUserInformationInUrlFromHeaderIfAlreadyInUrl(): BlackBox\Proof
{
$this
return $this
->forAll(
Set::of(...Method::cases()),
Set::of(...ProtocolVersion::cases()),
)
->then(function($method, $protocol) {
->prove(function($method, $protocol) {
$request = Request::of(
Url::of('//some:pwd@/foo'), // without the first // it interprets the host as the scheme
$method,
Expand Down
Loading