Changeset 5980
- Timestamp:
- 09/29/2017 07:20:28 PM (7 years ago)
- Location:
- sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php
r5979 r5980 72 72 } 73 73 74 // No indentifiers provided 75 if ( empty( $result['name'] ) ) { 76 $data['name'] = 'unknown'; 77 } 74 78 // Opera 75 if (79 elseif ( 76 80 false !== ( $key = array_search( 'Opera Mini', $result['name'] ) ) 77 81 || … … 123 127 } else { 124 128 $key = 0; 125 $data['name'] = 'webkit'; 129 $data['name'] = 'unknown'; 130 $result['version'][ $key ] = ''; 126 131 } 127 132 $data['version'] = $result['version'][ $key ]; -
sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/tests/phpunit/tests/browse-happy.php
r5979 r5980 450 450 ], 451 451 452 // Unknown 453 454 [ 455 'Dalvik/1.6.0 (Linux; U; Android 4.1.1; BroadSign Xpress 1.0.14 B- (720) Build/JRO03H)', 456 'Android unknown', 457 ], 458 [ // on Galaxy SIII 459 'Dalvik/1.6.0 (Linux; U; Android 4.4.2; SCH-I535 Build/KOT49H)', 460 'Android unknown', 461 ], 462 [ 463 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13F69 [FBAN/FBIOS;FBAV/59.0.0.51.142;FBBV/33266808;FBRV/0;FBDV/iPhone7,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.3.2;FBSS/3;FBCR/Telkomsel;FBID/phone;FBLC/en_US;FBOP/5] evaliant', 464 'iPhone unknown', // Actually: iPhone Facebook App 59.0.0.51.142 465 ], 466 [ 467 'Nokia-MIT-Browser/3.0', 468 'unknown', // It's really a Nokia Browser, but not critical to recognize as such. 469 ], 470 452 471 ]; 453 472 } … … 463 482 $result = $parsed['platform'] . ' ' . $parsed['name'] . ' ' . $parsed['version']; 464 483 465 $this->assertEquals( $expected, $result);484 $this->assertEquals( $expected, trim( $result ) ); 466 485 } 467 486
Note: See TracChangeset
for help on using the changeset viewer.