|
@@ 31-49 (lines=19) @@
|
| 28 |
|
/** |
| 29 |
|
* Test Google Bots |
| 30 |
|
*/ |
| 31 |
|
public function testGoogleBot() |
| 32 |
|
{ |
| 33 |
|
$ualist = array( |
| 34 |
|
'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', |
| 35 |
|
'Googlebot/2.1 (+http://www.google.com/bot.html)', |
| 36 |
|
'Googlebot-News', |
| 37 |
|
'Googlebot-Image/1.0', |
| 38 |
|
'Googlebot-Video/1.0', |
| 39 |
|
'SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)', |
| 40 |
|
'DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)', |
| 41 |
|
'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', |
| 42 |
|
'(compatible; Mediapartners-Google/2.1; +http://www.google.com/bot.html)', |
| 43 |
|
'Mediapartners-Google' |
| 44 |
|
); |
| 45 |
|
|
| 46 |
|
testUaList($this,'Robot','Owner',$ualist,'Google Inc.'); |
| 47 |
|
testUaList($this,'Robot','Type',$ualist,'Search Engine'); |
| 48 |
|
testUaListBooleanTrue($this,'Robot','SearchEngine',$ualist); |
| 49 |
|
} |
| 50 |
|
/** |
| 51 |
|
* Test Yandex Bots |
| 52 |
|
*/ |
|
@@ 94-112 (lines=19) @@
|
| 91 |
|
/** |
| 92 |
|
* Test Bing Bots |
| 93 |
|
*/ |
| 94 |
|
public function testBingBot() |
| 95 |
|
{ |
| 96 |
|
$ualist = array( |
| 97 |
|
'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)', |
| 98 |
|
'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)', |
| 99 |
|
'Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 530) like Gecko (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)', |
| 100 |
|
'msnbot/2.0b (+http://search.msn.com/msnbot.htm)', |
| 101 |
|
'msnbot-media/1.1 (+http://search.msn.com/msnbot.htm)', |
| 102 |
|
'Mozilla/5.0 (compatible; adidxbot/2.0; +http://www.bing.com/bingbot.htm)', |
| 103 |
|
'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 (compatible; adidxbot/2.0; +http://www.bing.com/bingbot.htm)', |
| 104 |
|
'Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 530) like Gecko (compatible; adidxbot/2.0; +http://www.bing.com/bingbot.htm)', |
| 105 |
|
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) BingPreview/1.0b', |
| 106 |
|
'Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 530) like Gecko BingPreview/1.0b' |
| 107 |
|
); |
| 108 |
|
|
| 109 |
|
testUaList($this,'Robot','Name',$ualist,'Bing'); |
| 110 |
|
testUaList($this,'Robot','Type',$ualist,'Search Engine'); |
| 111 |
|
testUaListBooleanTrue($this,'Robot','SearchEngine',$ualist); |
| 112 |
|
} |
| 113 |
|
/** |
| 114 |
|
* Test WASALive |
| 115 |
|
*/ |