We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 96-117 (lines=22) @@ | ||
| 93 | $this->errorHandler->handleErrors($executionResult, true); |
|
| 94 | } |
|
| 95 | ||
| 96 | public function testMaskErrorWithWrappedUserErrorAndThrowExceptionSetToTrue() |
|
| 97 | { |
|
| 98 | $executionResult = new ExecutionResult( |
|
| 99 | null, |
|
| 100 | [ |
|
| 101 | new Error('Error with wrapped user error', null, new UserError('My User Error')), |
|
| 102 | ] |
|
| 103 | ); |
|
| 104 | ||
| 105 | $this->errorHandler->handleErrors($executionResult, true); |
|
| 106 | ||
| 107 | $expected = [ |
|
| 108 | 'data' => null, |
|
| 109 | 'errors' => [ |
|
| 110 | [ |
|
| 111 | 'message' => 'Error with wrapped user error', |
|
| 112 | ], |
|
| 113 | ], |
|
| 114 | ]; |
|
| 115 | ||
| 116 | $this->assertEquals($expected, $executionResult->toArray()); |
|
| 117 | } |
|
| 118 | ||
| 119 | public function testMaskErrorWithoutWrappedExceptionAndThrowExceptionSetToTrue() |
|
| 120 | { |
|
| @@ 119-140 (lines=22) @@ | ||
| 116 | $this->assertEquals($expected, $executionResult->toArray()); |
|
| 117 | } |
|
| 118 | ||
| 119 | public function testMaskErrorWithoutWrappedExceptionAndThrowExceptionSetToTrue() |
|
| 120 | { |
|
| 121 | $executionResult = new ExecutionResult( |
|
| 122 | null, |
|
| 123 | [ |
|
| 124 | new Error('Error without wrapped exception'), |
|
| 125 | ] |
|
| 126 | ); |
|
| 127 | ||
| 128 | $this->errorHandler->handleErrors($executionResult, true); |
|
| 129 | ||
| 130 | $expected = [ |
|
| 131 | 'data' => null, |
|
| 132 | 'errors' => [ |
|
| 133 | [ |
|
| 134 | 'message' => 'Error without wrapped exception', |
|
| 135 | ], |
|
| 136 | ], |
|
| 137 | ]; |
|
| 138 | ||
| 139 | $this->assertEquals($expected, $executionResult->toArray()); |
|
| 140 | } |
|
| 141 | ||
| 142 | public function testConvertExceptionToUserWarning() |
|
| 143 | { |
|