Permalink
Browse files

updated testJsonPost to test 56a5ef4

new test would have failed before
  • Loading branch information...
1 parent 56a5ef4 commit 59c17803c4c32d3fd25d670b9263bac6f17d8ab0 @omeryar omeryar committed Aug 1, 2012
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);

0 comments on commit 59c1780

Please sign in to comment.