From 5e9af65486399ef3f9fb786920e26e40f2484d04 Mon Sep 17 00:00:00 2001
From: Saleh Souzanchi <saleh.souzanchi@gmail.com>
Date: Wed, 7 Mar 2012 08:50:11 +0330
Subject: [PATCH] testParseTrailingUTF8

---
 .../Test/Case/Routing/Route/CakeRouteTest.php | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php
index d4bf61cf4..2f68d90fb 100644
--- a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php
+++ b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php
@@ -857,4 +857,23 @@ class CakeRouteTest extends CakeTestCase {
 		);
 		$this->assertEquals($expected, $result);
 	}
+
+/**
+ * Test the /** special type on parsing - UTF8.
+ *
+ * @return void
+ */	
+	
+	public function testParseTrailingUTF8() {
+		$route = new CakeRoute('/:controller/:action/**');
+		$result = $route->parse('/posts/index/موبایل');
+		$expected = array(
+			'controller' => 'posts',
+			'action' => 'index',
+			'pass' => array('موبایل'),
+			'named' => array()
+		);
+		$this->assertEquals($expected, $result);
+
+	}	
 }