mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fix failing tests.
rawurlencode() and urlencode() handle utf8 differently.
This commit is contained in:
parent
0ea00c5f07
commit
fce70df6ff
2 changed files with 7 additions and 2 deletions
|
@ -1121,7 +1121,7 @@ class CakeRequestTest extends CakeTestCase {
|
|||
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);
|
||||
|
|
|
@ -519,7 +519,12 @@ class CakeRouteTest extends CakeTestCase {
|
|||
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'], '∂∂');
|
||||
|
|
Loading…
Reference in a new issue