Skip to content

Commit 2e00ed2

Browse files
committed
fix: Make failing integration tests more verbose
Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 3d8a7cb commit 2e00ed2

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

tests/integration/features/bootstrap/FeatureContext.php

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,23 @@ public function theSettingIsCurrently(string $settingName, string $expectedValue
214214
* @When I send a GET request to :url
215215
*/
216216
public function iSendAGetRequestTo($url) {
217-
$this->response = $this->client->request(
218-
'GET',
219-
$url,
220-
[
221-
'headers' => [
222-
'Accept' => 'text/html',
223-
],
224-
'query' => [
225-
'idp' => 1
226-
],
227-
]
228-
);
217+
try {
218+
$this->response = $this->client->request(
219+
'GET',
220+
$url,
221+
[
222+
'headers' => [
223+
'Accept' => 'text/html',
224+
],
225+
'query' => [
226+
'idp' => 1
227+
],
228+
]
229+
);
230+
} catch (\GuzzleHttp\Exception\ServerException $e) {
231+
$this->response = $e->getResponse();
232+
echo $this->response->getBody()->getContents();
233+
}
229234
}
230235
/**
231236
* @When I send a GET request with query params to :url

0 commit comments

Comments
 (0)