182 lines
4 KiB
YAML
182 lines
4 KiB
YAML
name: InteractsWithExceptionHandling
|
|
class_comment: null
|
|
dependencies:
|
|
- name: Closure
|
|
type: class
|
|
source: Closure
|
|
- name: ExceptionHandler
|
|
type: class
|
|
source: Illuminate\Contracts\Debug\ExceptionHandler
|
|
- name: ExceptionHandlerFake
|
|
type: class
|
|
source: Illuminate\Support\Testing\Fakes\ExceptionHandlerFake
|
|
- name: Assert
|
|
type: class
|
|
source: Illuminate\Testing\Assert
|
|
- name: ValidationException
|
|
type: class
|
|
source: Illuminate\Validation\ValidationException
|
|
- name: ConsoleApplication
|
|
type: class
|
|
source: Symfony\Component\Console\Application
|
|
- name: NotFoundHttpException
|
|
type: class
|
|
source: Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
|
- name: Throwable
|
|
type: class
|
|
source: Throwable
|
|
properties:
|
|
- name: originalExceptionHandler
|
|
visibility: protected
|
|
comment: '# * The original exception handler.
|
|
|
|
# *
|
|
|
|
# * @var \Illuminate\Contracts\Debug\ExceptionHandler|null'
|
|
- name: except
|
|
visibility: protected
|
|
comment: null
|
|
- name: originalHandler
|
|
visibility: protected
|
|
comment: null
|
|
methods:
|
|
- name: withExceptionHandling
|
|
visibility: protected
|
|
parameters: []
|
|
comment: "# * The original exception handler.\n# *\n# * @var \\Illuminate\\Contracts\\\
|
|
Debug\\ExceptionHandler|null\n# */\n# protected $originalExceptionHandler;\n#\
|
|
\ \n# /**\n# * Restore exception handling.\n# *\n# * @return $this"
|
|
- name: handleExceptions
|
|
visibility: protected
|
|
parameters:
|
|
- name: exceptions
|
|
comment: '# * Only handle the given exceptions via the exception handler.
|
|
|
|
# *
|
|
|
|
# * @param array $exceptions
|
|
|
|
# * @return $this'
|
|
- name: handleValidationExceptions
|
|
visibility: protected
|
|
parameters: []
|
|
comment: '# * Only handle validation exceptions via the exception handler.
|
|
|
|
# *
|
|
|
|
# * @return $this'
|
|
- name: withoutExceptionHandling
|
|
visibility: protected
|
|
parameters:
|
|
- name: except
|
|
default: '[]'
|
|
comment: '# * Disable exception handling for the test.
|
|
|
|
# *
|
|
|
|
# * @param array $except
|
|
|
|
# * @return $this'
|
|
- name: __construct
|
|
visibility: public
|
|
parameters:
|
|
- name: originalHandler
|
|
- name: except
|
|
default: '[]'
|
|
comment: '# * Create a new class instance.
|
|
|
|
# *
|
|
|
|
# * @param \Illuminate\Contracts\Debug\ExceptionHandler $originalHandler
|
|
|
|
# * @param array $except
|
|
|
|
# * @return void'
|
|
- name: report
|
|
visibility: public
|
|
parameters:
|
|
- name: e
|
|
comment: '# * Report or log an exception.
|
|
|
|
# *
|
|
|
|
# * @param \Throwable $e
|
|
|
|
# * @return void
|
|
|
|
# *
|
|
|
|
# * @throws \Exception'
|
|
- name: shouldReport
|
|
visibility: public
|
|
parameters:
|
|
- name: e
|
|
comment: '# * Determine if the exception should be reported.
|
|
|
|
# *
|
|
|
|
# * @param \Throwable $e
|
|
|
|
# * @return bool'
|
|
- name: render
|
|
visibility: public
|
|
parameters:
|
|
- name: request
|
|
- name: e
|
|
comment: '# * Render an exception into an HTTP response.
|
|
|
|
# *
|
|
|
|
# * @param \Illuminate\Http\Request $request
|
|
|
|
# * @param \Throwable $e
|
|
|
|
# * @return \Symfony\Component\HttpFoundation\Response
|
|
|
|
# *
|
|
|
|
# * @throws \Throwable'
|
|
- name: renderForConsole
|
|
visibility: public
|
|
parameters:
|
|
- name: output
|
|
- name: e
|
|
comment: '# * Render an exception to the console.
|
|
|
|
# *
|
|
|
|
# * @param \Symfony\Component\Console\Output\OutputInterface $output
|
|
|
|
# * @param \Throwable $e
|
|
|
|
# * @return void'
|
|
- name: assertThrows
|
|
visibility: protected
|
|
parameters:
|
|
- name: test
|
|
- name: expectedClass
|
|
default: Throwable::class
|
|
- name: expectedMessage
|
|
default: 'null'
|
|
comment: '# * Assert that the given callback throws an exception with the given
|
|
message when invoked.
|
|
|
|
# *
|
|
|
|
# * @param \Closure $test
|
|
|
|
# * @param class-string<\Throwable> $expectedClass
|
|
|
|
# * @param string|null $expectedMessage
|
|
|
|
# * @return $this'
|
|
traits:
|
|
- Closure
|
|
- Illuminate\Contracts\Debug\ExceptionHandler
|
|
- Illuminate\Support\Testing\Fakes\ExceptionHandlerFake
|
|
- Illuminate\Testing\Assert
|
|
- Illuminate\Validation\ValidationException
|
|
- Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
|
- Throwable
|
|
interfaces:
|
|
- ExceptionHandler
|