Skip to content

Commit

Permalink
[TASK] Adjust URL in user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
brotkrueml committed May 27, 2020
1 parent fe1568c commit 1dec843
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Middleware/UserAgentMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
class UserAgentMiddleware implements MiddlewareInterface
{
private const USER_AGENT_TEMPLATE = 'JobRouterClient/%s (https://github.com/brotkrueml/jobrouter-client) %s';
private const USER_AGENT_TEMPLATE = 'JobRouterClient/%s (https://jobrouter-client.rtfd.io/) %s';

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Client/RestClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function defaultUserAgentIsSendCorrectly(): void

self::assertArrayHasKey('User-Agent', $requestHeaders);
self::assertStringStartsWith('JobRouterClient/', $requestHeaders['User-Agent']);
self::assertStringEndsWith(' (https://github.com/brotkrueml/jobrouter-client)', $requestHeaders['User-Agent']);
self::assertStringEndsWith(' (https://jobrouter-client.rtfd.io/)', $requestHeaders['User-Agent']);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Middleware/UserAgentMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function userAgentIsCorrectlyAddedToRequestHeader(): void

self::assertSame(
\sprintf(
'JobRouterClient/%s (https://github.com/brotkrueml/jobrouter-client)',
'JobRouterClient/%s (https://jobrouter-client.rtfd.io/)',
(new Version())->getVersion()
),
$newRequest->getHeaderLine('User-Agent')
Expand All @@ -60,7 +60,7 @@ public function userAgentIsCorrectlyAddedToRequestHeaderWithAdditionGiven(): voi

self::assertSame(
\sprintf(
'JobRouterClient/%s (https://github.com/brotkrueml/jobrouter-client) SomeConnector/1.2.3',
'JobRouterClient/%s (https://jobrouter-client.rtfd.io/) SomeConnector/1.2.3',
(new Version())->getVersion()
),
$newRequest->getHeaderLine('User-Agent')
Expand Down

0 comments on commit 1dec843

Please sign in to comment.