Style fixes for Message and MessageTest

This commit is contained in:
PJ Dietz 2015-03-22 18:03:21 -04:00
parent 60a0913daf
commit 734c87188f
2 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,9 @@ abstract class Message implements MessageInterface
{ {
/** @var StreamableInterface */ /** @var StreamableInterface */
private $body; private $body;
/** @var HeaderCollection */
private $headers; private $headers;
/** @var string */
private $protcolVersion = "1.1"; private $protcolVersion = "1.1";
public function __construct() public function __construct()
@ -17,6 +19,8 @@ abstract class Message implements MessageInterface
$this->headers = new HeaderCollection(); $this->headers = new HeaderCollection();
} }
// Psr\Http\Message\MessageInterface -------------------------------------------------------------------------------
/** /**
* Retrieves the HTTP protocol version as a string. * Retrieves the HTTP protocol version as a string.
* *

View File

@ -19,7 +19,7 @@ class MessageTest extends \PHPUnit_Framework_TestCase
* @uses WellRESTed\Message\Message::__construct * @uses WellRESTed\Message\Message::__construct
* @uses WellRESTed\Message\HeaderCollection * @uses WellRESTed\Message\HeaderCollection
*/ */
public function testReturnsProtocolVersion11ByDefault() public function testReturnsProtocolVersion1Point1ByDefault()
{ {
$message = $this->getMockForAbstractClass("\\WellRESTed\\Message\\Message"); $message = $this->getMockForAbstractClass("\\WellRESTed\\Message\\Message");
$this->assertEquals("1.1", $message->getProtocolVersion()); $this->assertEquals("1.1", $message->getProtocolVersion());