2
2
3
3
use Illuminate \Database \Eloquent \ModelNotFoundException ;
4
4
use Lanin \Laravel \ApiExceptions \Support \Request ;
5
- use Symfony \Component \Debug \ Exception \ FatalErrorException ;
5
+ use Symfony \Component \ErrorHandler \ Error \ FatalError ;
6
6
7
7
class ExceptionsOutputTest extends TestCase
8
8
{
@@ -58,7 +58,7 @@ public function test_validation_error()
58
58
public function test_internal_error_error ()
59
59
{
60
60
$ this ->app ['router ' ]->get ('foo ' , function () {
61
- throw new FatalErrorException ('Fatal error. ' , 0 , 1 , __FILE__ , __LINE__ );
61
+ throw new \ Exception ('Fatal error ' );
62
62
});
63
63
64
64
$ this ->json ('GET ' , '/foo ' )
@@ -76,14 +76,14 @@ public function test_internal_error_in_debug_mode()
76
76
putenv ('APP_DEBUG=true ' );
77
77
78
78
$ this ->app ['router ' ]->get ('foo ' , function () {
79
- throw new FatalErrorException ('Fatal error. ' , 0 , 1 , __FILE__ , __LINE__ );
79
+ throw new \ Exception ('Fatal error ' );
80
80
});
81
81
82
82
$ this ->json ('GET ' , '/foo ' )
83
83
->assertStatus (500 )
84
84
->assertJsonFragment ([
85
- 'id ' => 'fatal_error_exception ' ,
86
- 'message ' => 'Fatal error. '
85
+ 'id ' => 'exception ' ,
86
+ 'message ' => 'Fatal error '
87
87
])
88
88
->assertJsonStructure ([
89
89
'trace ' ,
@@ -154,4 +154,4 @@ public function rules()
154
154
'name ' => 'required '
155
155
];
156
156
}
157
- }
157
+ }
0 commit comments