Permalink
Browse files

Add test for query string encoding.

Closes #2768
  • Loading branch information...
1 parent 81208d1 commit 45e3414d49707b690de27cd2e6dd8651a205aa69 @markstory markstory committed Apr 11, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
View
9 lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
@@ -972,12 +972,21 @@ public function testGet() {
->method('request')
->with(array('method' => 'GET', 'uri' => 'https://secure.example.com/test.php?one=two'));
+ $this->RequestSocket->expects($this->at(6))
+ ->method('request')
+ ->with(array('method' => 'GET', 'uri' => 'https://example.com/oauth/access?clientid=123&redirect_uri=http%3A%2F%2Fexample.com&code=456'));
+
$this->RequestSocket->get('http://www.google.com/');
$this->RequestSocket->get('http://www.google.com/', array('foo' => 'bar'));
$this->RequestSocket->get('http://www.google.com/', 'foo=bar');
$this->RequestSocket->get('http://www.google.com/?foo=bar', array('foobar' => '42', 'foo' => '23'));
$this->RequestSocket->get('http://www.google.com/', null, array('version' => '1.0'));
$this->RequestSocket->get('https://secure.example.com/test.php', array('one' => 'two'));
+ $this->RequestSocket->get('https://example.com/oauth/access', array(
+ 'clientid' => '123',
+ 'redirect_uri' => 'http://example.com',
+ 'code' => 456
+ ));
}
/**

0 comments on commit 45e3414

Please sign in to comment.