diff --git a/README.md b/README.md index cf8adaa..df970c1 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ $request = new Request($url); $request ->setDefaultSpeedOptions(true) ->setDownloadOnlyIf('text/html') - ->setDestkopUserAgent() + ->setDesktopUserAgent() ; $result = $request->exec(); if ($result instanceof \PiedWeb\Curl\Response) { @@ -57,7 +57,7 @@ $r ->setReferer(string $url) ->setUserAgent(string $ua) - ->setDestkopUserAgent() + ->setDesktopUserAgent() ->setMobileUserAgent() ->setLessJsUserAgent() diff --git a/src/UserAgentTrait.php b/src/UserAgentTrait.php index ffefb52..22c29dd 100644 --- a/src/UserAgentTrait.php +++ b/src/UserAgentTrait.php @@ -5,11 +5,11 @@ trait UserAgentTrait { /** - * An self::setUserAgent()'s alias to add an user-agent wich correspond to a Destkop PC. + * An self::setUserAgent()'s alias to add an user-agent wich correspond to a Desktop PC. * * @return self */ - public function setDestkopUserAgent() + public function setDesktopUserAgent() { $this->setUserAgent('Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0'); diff --git a/tests/RequestTest.php b/tests/RequestTest.php index 0580145..5039365 100644 --- a/tests/RequestTest.php +++ b/tests/RequestTest.php @@ -17,7 +17,7 @@ public function testNotDownload() ->setDefaultGetOptions() ->setDownloadOnlyIf('html') ->setReturnHeader() - ->setDestkopUserAgent() + ->setDesktopUserAgent() ->setEncodingGzip() ; $result = $request->exec(); @@ -34,7 +34,7 @@ public function testEffectiveUrl() ->setDefaultGetOptions() ->setDownloadOnlyIf('html') ->setReturnHeader() - ->setDestkopUserAgent() + ->setDesktopUserAgent() ->setEncodingGzip() ; $result = $request->exec(); @@ -53,7 +53,7 @@ public function testCurlError() $request ->setDefaultGetOptions() ->setReturnHeader() - ->setDestkopUserAgent() + ->setDesktopUserAgent() ->setEncodingGzip() ; $result = $request->exec(); @@ -69,7 +69,7 @@ public function test404() $request ->setDefaultGetOptions() ->setDownloadOnlyIf('html') - ->setDestkopUserAgent() + ->setDesktopUserAgent() ->setEncodingGzip() ; $result = $request->exec();