Skip to content

Commit

Permalink
Fix failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 29, 2012
1 parent b9d1512 commit c22d6d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Network/Http/Adapter/Stream.php
Expand Up @@ -120,15 +120,15 @@ protected function _buildHeaders(Request $request, $options) {
/**
* Builds the request content based on the request object.
*
* If the $request->content() is a string, it will be used as is.
* If the $request->body() is a string, it will be used as is.
* Array data will be processed with Cake\Network\Http\FormData
*
* @param Cake\Network\Http\Request $request The request being sent.
* @param array $options Array of options to use.
* @return void
*/
protected function _buildContent(Request $request, $options) {
$content = $request->content();
$content = $request->body();
if (empty($content)) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Network/Http/Message.php
Expand Up @@ -36,14 +36,14 @@ class Message {
*
* @var array
*/
protected $_headers;
protected $_headers = [];

/**
* The array of cookies in the response.
*
* @var array
*/
protected $_cookies;
protected $_cookies = [];

/**
* HTTP Version being used.
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/TestCase/Network/Http/Adapter/StreamTest.php
Expand Up @@ -92,7 +92,7 @@ public function testSendContextContentString() {
->header([
'Content-Type' => 'application/json'
])
->content($content);
->body($content);

$options = [
'redirect' => 20
Expand All @@ -119,7 +119,7 @@ public function testSendContextContentArray() {
->header([
'Content-Type' => 'application/json'
])
->content(['a' => 'my value']);
->body(['a' => 'my value']);

$this->stream->send($request, []);
$result = $this->stream->contextOptions();
Expand Down

0 comments on commit c22d6d1

Please sign in to comment.