From 45e3414d49707b690de27cd2e6dd8651a205aa69 Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 10 Apr 2012 20:08:12 -0400 Subject: [PATCH] Add test for query string encoding. Closes #2768 --- lib/Cake/Test/Case/Network/Http/HttpSocketTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php index 0051c29714e..7902fbc2bac 100644 --- a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php +++ b/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 + )); } /**