Skip to content

Commit

Permalink
fix tests and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
mimmi20 committed Feb 16, 2019
1 parent 6c4a6bf commit de24175
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/GenericRequestFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public function testCreateRequestFromPsr7Message(): void
$userAgent = 'testUA';
$deviceUa = 'testDeviceUa';
$headers = [
Constants::HEADER_HTTP_USERAGENT => $userAgent,
Constants::HEADER_DEVICE_UA => $deviceUa,
Constants::HEADER_HTTP_USERAGENT => $userAgent,
Constants::HEADER_UCBROWSER_DEVICE_UA => $deviceUa,
];

$expected = new GenericRequest(ServerRequestFactory::fromGlobals($headers));
Expand Down
12 changes: 6 additions & 6 deletions tests/GenericRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ public function testConstruct(): void
$browserUa = 'testBrowserUA';
$deviceUa = 'testDeviceUA';
$headers = [
Constants::HEADER_HTTP_USERAGENT => $userAgent,
Constants::HEADER_DEVICE_UA => $deviceUa,
Constants::HEADER_UCBROWSER_UA => $browserUa,
Constants::HEADER_HTTP_USERAGENT => $userAgent,
Constants::HEADER_DEVICE_STOCK_UA => $deviceUa,
Constants::HEADER_UCBROWSER_UA => $browserUa,
];

$expectedHeaders = [
'user-agent' => $userAgent,
'x-device-user-agent' => $deviceUa,
'x-ucbrowser-ua' => $browserUa,
'user-agent' => $userAgent,
'device-stock-ua' => $deviceUa,
'x-ucbrowser-ua' => $browserUa,
];

$object = new GenericRequest(ServerRequestFactory::fromGlobals($headers));
Expand Down

0 comments on commit de24175

Please sign in to comment.