Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix failing tests.

rawurlencode() and urlencode() handle utf8 differently.
  • Loading branch information...
commit fce70df6ff26da0b63fa342e024f524faed18213 1 parent 0ea00c5
@markstory markstory authored
View
2  lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -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);
View
7 lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php
@@ -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'], '∂∂');
Please sign in to comment.
Something went wrong with that request. Please try again.