Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release-0.1.4'

  • Loading branch information...
commit 5c9fec822e96b53d722b1b38bfcd91fda52a9c43 2 parents 6a9ed1f + 2183c94
@trq trq authored
View
BIN  build/proem.phar
Binary file not shown
View
9 lib/Proem/Api/IO/Http/Response.php
@@ -127,7 +127,7 @@ public function __construct()
*/
public function setHttpVersion($version)
{
- if (in_array($version, [1.0,1.1]) {
+ if (in_array($version, [1.0,1.1])) {
$this->httpVersion = $version;
}
return $this;
@@ -149,7 +149,12 @@ public function getHttpVersion()
public function setHttpStatus($status)
{
if (isset($this->httpStatusCodes[$status])) {
- $this->httpVersion = $status;
+ $this->httpStatus = $status;
+ } else {
+ $codes = array_flip($this->httpStatusCodes);
+ if (isset($status, $codes)) {
+ $this->httpStatus = $codes[$status];
+ }
}
return $this;
}
View
2  lib/Proem/Api/Proem.php
@@ -49,7 +49,7 @@ class Proem
/**
* Store the framework version
*/
- const VERSION = '0.1.3';
+ const VERSION = '0.1.4';
/**
* Store events
View
6 tests/lib/Proem/Tests/IO/Http/Response.php → tests/lib/Proem/Tests/IO/Http/ResponseTest.php
@@ -57,16 +57,14 @@ public function testStatus()
public function testHeaders()
{
- $r = new Request;
+ $r = new Response;
$r->setHeader('foo', 'bar');
$this->assertEquals('bar', $r->getHeader('foo'));
- $r->setHeaders['a' => 'b']);
- $this->assertEquals('b', $r->getHeader('a'));
}
public function testContentLength()
{
- $r = new Request;
+ $r = new Response;
$r->appendToBody('foo');
$this->assertEquals(3, $r->getHeader('Content-Length'));
$r->appendToBody('foo');
Please sign in to comment.
Something went wrong with that request. Please try again.