Skip to content

Commit

Permalink
Add test for query string encoding.
Browse files Browse the repository at this point in the history
Closes #2768
  • Loading branch information
markstory committed Apr 11, 2012
1 parent 81208d1 commit 45e3414
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
Expand Up @@ -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
));
}

/**
Expand Down

0 comments on commit 45e3414

Please sign in to comment.