Skip to content

Commit 743fa30

Browse files
committed
Make request public in test DeleteAdapter
1 parent fb69f41 commit 743fa30

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/ClientTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -715,29 +715,29 @@ public function end($handle)
715715

716716
final class DeleteAdapter implements Adapter
717717
{
718-
private $_request;
718+
public $request;
719719

720720
public function start(Request $request)
721721
{
722-
$this->_request = $request;
722+
$this->request = $request;
723723
}
724724

725725
public function end($handle)
726726
{
727-
if (substr($this->_request->getUrl(), -5) === 'token') {
727+
if (substr($this->request->getUrl(), -5) === 'token') {
728728
return new Response(200, ['Content-Type' => ['application/json']], ['access_token' => 'a token', 'expires_in' => 1]);
729729
}
730730

731731
if (
732-
$this->_request->getMethod() === 'DELETE' &&
733-
$this->_request->getUrl() === 'baseUrl/v1/resource+name/the+id' &&
734-
$this->_request->getHeaders() === [
732+
$this->request->getMethod() === 'DELETE' &&
733+
$this->request->getUrl() === 'baseUrl/v1/resource+name/the+id' &&
734+
$this->request->getHeaders() === [
735735
'Content-Type' => 'application/json',
736736
'Accept-Encoding' => 'gzip',
737737
'Authorization' => 'Bearer a token',
738738
]
739739
) {
740-
$body = $this->_request->getBody();
740+
$body = $this->request->getBody();
741741

742742
if ($body === null || $body === '{"the key":"the value"}') {
743743
return new Response(204, ['Content-Type' => ['application/json']]);

0 commit comments

Comments
 (0)