Skip to content

Commit

Permalink
Added: AdxPsfFetcher-Google webcrawler verifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Krasnoyarov committed Nov 2, 2016
1 parent 6a5ccd6 commit 547dd05
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Head

- Added: `AdxPsfFetcher-Google` webcrawler verifier.
- Added: `Mojeek Ltd.` webcrawler verifier.
- Chore: improve `README.md`.

Expand Down
1 change: 1 addition & 0 deletions src/WebcrawlerVerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class WebcrawlerVerifier
'adidxbot' => 'WebcrawlerVerifier\Webcrawler\MicrosoftCorporationVerifier',
// Also `AdsBot-Google-Mobile-Apps`
'AdsBot-Google' => 'WebcrawlerVerifier\Webcrawler\GoogleIncVerifier',
'AdxPsfFetcher-Google' => 'WebcrawlerVerifier\Webcrawler\GoogleIncVerifier',
'Applebot' => 'WebcrawlerVerifier\Webcrawler\AppleIncVerifier',
'AppleNewsBot' => 'WebcrawlerVerifier\Webcrawler\InactiveVerifier',
'Baiduspider' => 'WebcrawlerVerifier\Webcrawler\BaiduVerifier',
Expand Down
15 changes: 15 additions & 0 deletions tests/WebcrawlerVerifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,21 @@ public function testVerifyAdsBotGoogleWebcrawler()
}
}

public function testVerifyAdxPsfFetcherGoogleWebcrawlerVerifier()
{
$webcrawlerVerifier = new \WebcrawlerVerifier\WebcrawlerVerifier();
$userAgent = 'AdxPsfFetcher-Google';

$this->assertEquals($webcrawlerVerifier::UNVERIFIED, $webcrawlerVerifier->verify(
$userAgent,
'192.168.0.1'
));
$this->assertEquals($webcrawlerVerifier::VERIFIED, $webcrawlerVerifier->verify(
$userAgent,
'66.249.90.86'
));
}

public function testVerifyApplebotWebcrawler()
{
$webcrawlerVerifier = new \WebcrawlerVerifier\WebcrawlerVerifier();
Expand Down

0 comments on commit 547dd05

Please sign in to comment.