|
@@ 45-54 (lines=10) @@
|
| 42 |
|
$this->thenCountOfDomainEventsIs($response, 0); |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
public function testRecordOn_FunctionThrowingFatalError_ShouldReturnResponseWithOneFatalError(): void |
| 46 |
|
{ |
| 47 |
|
$response = $this->whenRecordOnFunctionThat( |
| 48 |
|
$this->throwFatalException() |
| 49 |
|
); |
| 50 |
|
|
| 51 |
|
$this->thenCountOfErrorsOnResponseIs($response, 1); |
| 52 |
|
$this->thenCountOfDomainEventsIs($response, 0); |
| 53 |
|
$this->thenFirstErrorHasMessage($response, ResponseRecorder::FATAL_ERROR_MESSAGE); |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
public function testRecordOn_FunctionThrowingShowableError_ShouldReturnResponseWithShowableError(): void |
| 57 |
|
{ |
|
@@ 88-98 (lines=11) @@
|
| 85 |
|
$this->thenFirstErrorHasMessageParams($response, $testParams); |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
public function testRecordOn_FunctionThrowingCommandDispatchExceptionWithPreviousFatalException_ShouldReturnResponseWithShowableFatalError( |
| 89 |
|
): void |
| 90 |
|
{ |
| 91 |
|
$response = $this->whenRecordOnFunctionThat( |
| 92 |
|
$this->throwCommandDispatchExceptionWithPreviousFatal() |
| 93 |
|
); |
| 94 |
|
|
| 95 |
|
$this->thenCountOfErrorsOnResponseIs($response, 1); |
| 96 |
|
$this->thenCountOfDomainEventsIs($response, 0); |
| 97 |
|
$this->thenFirstErrorHasMessage($response, ResponseRecorder::FATAL_ERROR_MESSAGE); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
public function testRecordOn_FunctionDispatchingErrorDomainEvent_ShouldReturnResponseWithShowableError(): void |
| 101 |
|
{ |