Permalink
Browse files

Added Tests

  • Loading branch information...
mathmarques committed Mar 21, 2017
1 parent c5dcaf4 commit c491a0c81ed5c514144d2b47a05cfda2f17fb7c3
Showing with 10 additions and 2 deletions.
  1. +10 −2 tests/Http/RequestTest.php
View
@@ -74,12 +74,20 @@ public function testWithMethod()
$this->assertAttributeEquals('PUT', 'originalMethod', $request);
}
public function testWithAllAllowedCharactersMethod()
{
$request = $this->requestFactory()->withMethod("!#$%&'*+.^_`|~09AZ-");
$this->assertAttributeEquals("!#$%&'*+.^_`|~09AZ-", 'method', $request);
$this->assertAttributeEquals("!#$%&'*+.^_`|~09AZ-", 'originalMethod', $request);
}
/**
* @expectedException \InvalidArgumentException
*/
public function testWithMethodInvalid()
{
$this->requestFactory()->withMethod('FOO');
$this->requestFactory()->withMethod('B@R');
}
public function testWithMethodNull()
@@ -208,7 +216,7 @@ public function testCreateRequestWithInvalidMethodString()
$cookies = [];
$serverParams = [];
$body = new RequestBody();
$request = new Request('FOO', $uri, $headers, $cookies, $serverParams, $body);
$request = new Request('B@R', $uri, $headers, $cookies, $serverParams, $body);
}
/**

0 comments on commit c491a0c

Please sign in to comment.