Add Windows Phone OS to mobile browser list.

Fixes #2428
This commit is contained in:
mark_story 2012-01-01 12:57:35 -05:00
parent c90aafb1c7
commit ac408b38e3
2 changed files with 5 additions and 1 deletions

View file

@ -107,7 +107,7 @@ class CakeRequest implements ArrayAccess {
'Android', 'AvantGo', 'BlackBerry', 'DoCoMo', 'Fennec', 'iPod', 'iPhone', 'Android', 'AvantGo', 'BlackBerry', 'DoCoMo', 'Fennec', 'iPod', 'iPhone',
'J2ME', 'MIDP', 'NetFront', 'Nokia', 'Opera Mini', 'Opera Mobi', 'PalmOS', 'PalmSource', 'J2ME', 'MIDP', 'NetFront', 'Nokia', 'Opera Mini', 'Opera Mobi', 'PalmOS', 'PalmSource',
'portalmmm', 'Plucker', 'ReqwirelessWeb', 'SonyEricsson', 'Symbian', 'UP\\.Browser', 'portalmmm', 'Plucker', 'ReqwirelessWeb', 'SonyEricsson', 'Symbian', 'UP\\.Browser',
'webOS', 'Windows CE', 'Xiino' 'webOS', 'Windows CE', 'Windows Phone OS', 'Xiino'
)) ))
); );

View file

@ -636,6 +636,10 @@ class CakeRequestTest extends CakeTestCase {
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre Fennec/2.0b1pre'; $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre Fennec/2.0b1pre';
$this->assertTrue($request->is('mobile')); $this->assertTrue($request->is('mobile'));
$this->assertTrue($request->isMobile()); $this->assertTrue($request->isMobile());
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG; OMNIA7)';
$this->assertTrue($request->is('mobile'));
$this->assertTrue($request->isMobile());
} }
/** /**