Skip to content

Commit

Permalink
qa: fix ProxyAdapterTest that asserts against user-agent
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
  • Loading branch information
weierophinney committed Jun 23, 2020
1 parent e7d6f46 commit 573ee0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/Client/CommonHttpTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testGetLastRawRequest()
$this->client->setUri($this->baseuri . 'testHeaders.php');
$this->client->setParameterGet(['someinput' => 'somevalue']);
$this->client->setHeaders([
'X-Powered-By' => 'My Glorious Golden Ass',
'X-Powered-By' => 'A lot of PHP',
]);

$this->client->setMethod('TRACE');
Expand Down
10 changes: 5 additions & 5 deletions test/Client/ProxyAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function testGetLastRawRequest()
$this->client->setUri($this->baseuri . 'testHeaders.php');
$this->client->setParameterGet(['someinput' => 'somevalue']);
$this->client->setHeaders([
'X-Powered-By' => 'My Glorious Golden Ass',
'X-Powered-By' => 'A lot of PHP',
]);

$this->client->setMethod('TRACE');
Expand All @@ -153,17 +153,17 @@ public function testGetLastRawRequest()
. 'Host: ' . $host . "\r\n"
. 'Connection: close' . "\r\n"
. 'Accept-Encoding: gzip, deflate' . "\r\n"
. 'User-Agent: Laminas\Http\Client' . "\r\n"
. 'X-Powered-By: My Glorious Golden Ass' . "\r\n\r\n",
. 'User-Agent: Laminas_Http_Client' . "\r\n"
. 'X-Powered-By: A lot of PHP' . "\r\n\r\n",
$this->client->getLastRawRequest()
);

$this->assertSame(
'TRACE /testHeaders.php?someinput=somevalue HTTP/1.1' . "\r\n"
. 'Host: ' . $host . "\r\n"
. 'Accept-Encoding: gzip, deflate' . "\r\n"
. 'User-Agent: Laminas\Http\Client' . "\r\n"
. 'X-Powered-By: My Glorious Golden Ass' . "\r\n"
. 'User-Agent: Laminas_Http_Client' . "\r\n"
. 'X-Powered-By: A lot of PHP' . "\r\n"
. 'Connection: close' . "\r\n\r\n",
$res->getBody()
);
Expand Down

0 comments on commit 573ee0d

Please sign in to comment.