Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Fix failing tests.
Browse files Browse the repository at this point in the history
rawurlencode() and urlencode() handle utf8 differently.
  • Loading branch information
markstory committed Feb 18, 2012
1 parent 0ea00c5 commit fce70df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Network/CakeRequestTest.php
Expand Up @@ -1121,7 +1121,7 @@ public function testGetParamsWithDot() {
public function testGetParamWithUrlencodedElement() {
$_GET['/posts/add/∂∂'] = '';
$_SERVER['PHP_SELF'] = '/cake_dev/app/webroot/index.php';
$_SERVER['REQUEST_URI'] = '/cake_dev/posts/add/%2202%2202';
$_SERVER['REQUEST_URI'] = '/cake_dev/posts/add/%E2%88%82%E2%88%82';

$request = new CakeRequest();
$this->assertEquals(array(), $request->query);
Expand Down
7 changes: 6 additions & 1 deletion lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php
Expand Up @@ -519,7 +519,12 @@ public function testParseUrlDecodeElements() {
array('action' => 'view')
);
$route->compile();
$result = $route->parse('/posts/%2202%2202');
$result = $route->parse('/posts/%E2%88%82%E2%88%82');
$this->assertEquals($result['controller'], 'posts');
$this->assertEquals($result['action'], 'view');
$this->assertEquals($result['slug'], '∂∂');

$result = $route->parse('/posts/∂∂');
$this->assertEquals($result['controller'], 'posts');
$this->assertEquals($result['action'], 'view');
$this->assertEquals($result['slug'], '∂∂');
Expand Down

0 comments on commit fce70df

Please sign in to comment.