Skip to content
Permalink
Browse files

Updated the user agent string

  • Loading branch information
cedx committed Jun 11, 2020
1 parent e1a55fe commit 0bd4d523cd59da15d0e69c47fe09139f25a95daf
Showing with 3 additions and 2 deletions.
  1. +1 −1 share/api.http
  2. +2 −1 test/ClientTest.php
@@ -6,7 +6,7 @@
POST {{baseUrl}}/comment-check
Content-Type: application/x-www-form-urlencoded

blog=https%3A%2F%2Fdocs.belin.io%2Fakismet.php&comment_author=Akismet&comment_author_url=https%3A%2F%2Fdocs.belin.io%2Fakismet.php&comment_content=I'm%20testing%20out%20the%20Service%20API.&comment_type=comment&is_test=true&referrer=https%3A%2F%2Fpackagist.org%2Fpackages%2Fcedx%2Fakismet&user_agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64%3B%20rv%3A70.0)%20Gecko%2F20100101%20Firefox%2F70.0&user_ip=192.168.0.1&user_role=administrator
blog=https%3A%2F%2Fdocs.belin.io%2Fakismet.php&comment_author=Akismet&comment_author_url=https%3A%2F%2Fdocs.belin.io%2Fakismet.php&comment_content=I'm%20testing%20out%20the%20Service%20API.&comment_type=comment&is_test=true&referrer=https%3A%2F%2Fpackagist.org%2Fpackages%2Fcedx%2Fakismet&user_agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F83.0.4103.97%20Safari%2F537.36%20Edg%2F83.0.478.45&user_ip=192.168.0.1&user_role=administrator

###

@@ -64,7 +64,8 @@ protected function setUp(): void {
$blog = new Blog(new Uri("https://docs.belin.io/akismet.php"));
$this->client = (new Client((string) getenv("AKISMET_API_KEY"), $blog))->setTest(true);

$author = (new Author("192.168.0.1", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0"))
$userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Edg/83.0.478.45";
$author = (new Author("192.168.0.1", $userAgent))
->setName("Akismet")
->setRole("administrator")
->setUrl(new Uri("https://docs.belin.io/akismet.php"));

0 comments on commit 0bd4d52

Please sign in to comment.