MAPG-177 refactor GoogleOAuth, Http\Request, Http\Response to be more testable

This commit is contained in:
bence committed 2020-06-26 00:28:37 +02:00
1 parent fd657b4244
commit c06dd1e1d2
6 files changed
+60 -14

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
<?php namespace MapGuesser\Interfaces\Http;
interface IRequest
{
const HTTP_GET = 0;
const HTTP_POST = 1;
public function setUrl(string $url): void;
public function setMethod(int $method): void;
public function setQuery($query);
public function setHeaders(array $headers);
public function send(): IResponse;
}
+8
View File
@@ -0,0 +1,8 @@
<?php namespace MapGuesser\Interfaces\Http;
interface IResponse
{
public function getBody();
public function getHeaders();
}