cvs: pear /Net_UserAgent_Mobile/tests 07-airhphone.phpt

From: Date: Fri, 20 Jan 2006 07:31:58 +0000
Subject: cvs: pear /Net_UserAgent_Mobile/tests 07-airhphone.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-37657@lists.php.net to get a copy of this message
kuboa Fri Jan 20 07:31:58 2006 UTC Modified files: /pear/Net_UserAgent_Mobile/tests 07-airhphone.phpt Log: - Added tests for AH-K3001V, AH-J3003S, WX310SA. - Changed expected values for the new user agent name 'WILLCOM'. http://cvs.php.net/viewcvs.cgi/pear/Net_UserAgent_Mobile/tests/07-airhphone.phpt?r1=1.5&r2=1.6&diff_format=u Index: pear/Net_UserAgent_Mobile/tests/07-airhphone.phpt diff -u pear/Net_UserAgent_Mobile/tests/07-airhphone.phpt:1.5 pear/Net_UserAgent_Mobile/tests/07-airhphone.phpt:1.6 --- pear/Net_UserAgent_Mobile/tests/07-airhphone.phpt:1.5 Sat Sep 25 12:40:13 2004 +++ pear/Net_UserAgent_Mobile/tests/07-airhphone.phpt Fri Jan 20 07:31:58 2006 @@ -13,14 +13,13 @@ require_once('../Mobile.php'); $tests = array( - // ua, name, vendor, model, model_version, browser_version - array('Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0', 'DDIPOCKET', 'JRC', 'AH-J3001V,AH-J3002V', '1.0', '0100', 50) + // ua, name, vendor, model, model_version, browser_version, cache_size + array('Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0', 'WILLCOM', 'JRC', 'AH-J3001V,AH-J3002V', '1.0', '0100', 50), + array('Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.7.2.70.000000/0.1/C100) Opera 7.0', 'WILLCOM', 'KYOCERA', 'AH-K3001V', '1.7.2.70.000000', '0.1', 100), + array('Mozilla/3.0(DDIPOCKET;JRC/AH-J3003S/1.0/0100/c50)CNF/2.0', 'WILLCOM', 'JRC', 'AH-J3003S', '1.0', '0100', 50), + array('Mozilla/3.0(WILLCOM;SANYO/WX310SA/2;1/1/C128) NetFront/3.3,61.198.142.127', 'WILLCOM', 'SANYO', 'WX310SA', '2;1', '1', 128) ); -$test_agents = array( - 'Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0' - ); - print "Testing AirH\"PHONE ...\n"; foreach ($tests as $value) { @@ -44,15 +43,6 @@ print "Carrier long name isn't AirH\n"; } } - -foreach ($test_agents as $value) { - $_SERVER['HTTP_USER_AGENT'] = $value; - $agent = &Net_UserAgent_Mobile::factory(); - print is_object($agent) . "\n"; - print strtolower(get_parent_class($agent)) . "\n"; - print strtolower(get_class($agent)) . "\n"; - print $agent->isAirHPhone() . "\n"; -} ?> --POST-- --GET-- @@ -62,7 +52,7 @@ net_useragent_mobile_common net_useragent_mobile_airhphone 1 -DDIPOCKET +WILLCOM JRC AH-J3001V,AH-J3002V 1.0 @@ -72,3 +62,29 @@ net_useragent_mobile_common net_useragent_mobile_airhphone 1 +WILLCOM +KYOCERA +AH-K3001V +1.7.2.70.000000 +0.1 +100 +1 +net_useragent_mobile_common +net_useragent_mobile_airhphone +1 +WILLCOM +JRC +AH-J3003S +1.0 +0100 +50 +1 +net_useragent_mobile_common +net_useragent_mobile_airhphone +1 +WILLCOM +SANYO +WX310SA +2;1 +1 +128

« previous php.pear.cvs (#37657) next »