Codeception / Codeception/module-laminas

Codeception re-throws exception from MvcEvent occurred in Laminas-request

オープン
#27 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
1
フォーク
7
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello, i have scenario:
1. test makes GET-request
```
public function userTriesToGetTestInfo( ApiTester $i ): void
{
$i->sendGet( 'http://example.com/test' );
}
```
2. `testAction` throws `Exception`, logic catches it and generates correct JSON-response with 400 http code.
3. Codeception in sources re-throws Exception from MvcEvent:
https://github.com/Codeception/module-laminas/blob/00d6cf8ae6a10ef52b3569febf1d6277d7b3b8e1/src/Codeception/Lib/Connector/Laminas.php#L103-L106

questions:
1. what is the purpose of this behavior?
2. how to prevent such re-throws and gracefully receive JSON-response to make needed assertion in test-code?

thanks!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。