Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated testJsonPost to test 56a5ef4

new test would have failed before
  • Loading branch information...
commit 59c17803c4c32d3fd25d670b9263bac6f17d8ab0 1 parent 56a5ef4
@omeryar omeryar authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 tests/cases/net/http/ServiceTest.php
View
10 tests/cases/net/http/ServiceTest.php
@@ -178,15 +178,15 @@ public function testDelete() {
public function testJsonPost() {
$http = new Service($this->_testConfig);
- $http->post('update.xml', array('status' => 'cool'), array('type' => 'json'));
+ $http->post('update.xml', array('status' => array('cool', 'awesome')), array('type' => 'json'));
$expected = join("\r\n", array(
'POST /update.xml HTTP/1.1',
'Host: localhost:80',
'Connection: Close',
'User-Agent: Mozilla/5.0',
'Content-Type: application/json',
- 'Content-Length: 17',
- '', '{"status":"cool"}'
+ 'Content-Length: 29',
+ '', '{"status":["cool","awesome"]}'
));
$result = (string) $http->last->request;
$this->assertEqual($expected, $result);
@@ -197,8 +197,8 @@ public function testJsonPost() {
'Connection: Close',
'User-Agent: Mozilla/5.0',
'Content-Type: application/json',
- 'Content-Length: 17',
- '', '{"status":"cool"}'
+ 'Content-Length: 29',
+ '', '{"status":["cool","awesome"]}'
));
$result = (string) $http->last->response;
$this->assertEqual($expected, $result);
Please sign in to comment.
Something went wrong with that request. Please try again.