From dc150881aed54b4e103b69ad1fab0c45f62c15e9 Mon Sep 17 00:00:00 2001 From: Yoann Celton Date: Wed, 28 Nov 2018 23:22:55 +1100 Subject: [PATCH] Preparing for tests --- composer.json | 1 + phpunit.xml.dist | 2 +- src/MatrixHttpApi.php | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a076b0c..858e76a 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": "~7.2", + "guzzlehttp/guzzle": "^6.3", "rappasoft/laravel-helpers": "^1.0" }, "require-dev": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 38e9e97..e670b3b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -21,7 +21,7 @@ - + diff --git a/src/MatrixHttpApi.php b/src/MatrixHttpApi.php index 87a112a..7e46800 100644 --- a/src/MatrixHttpApi.php +++ b/src/MatrixHttpApi.php @@ -6,7 +6,6 @@ use Aryess\PhpMatrixSdk\Exceptions\MatrixException; use Aryess\PhpMatrixSdk\Exceptions\MatrixHttpLibException; use Aryess\PhpMatrixSdk\Exceptions\MatrixRequestException; use GuzzleHttp\Client; -use GuzzleHttp\Exception\RequestException; /** * Contains all raw Matrix HTTP Client-Server API calls. @@ -93,7 +92,10 @@ class MatrixHttpApi { $this->client = new Client(); $this->default429WaitMs = $default429WaitMs; $this->useAuthorizationHeader = $useAuthorizationHeader; + } + public function setClient(Client $client) { + $this->client = $client; } /**