Codeception / Codeception/module-laminas
Codeception re-throws exception from MvcEvent occurred in Laminas-request
- Dominant language
- PHP
- Stars
- 1
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
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!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.