File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,12 @@ public function testActionWithCatchableException()
46
46
$ request = new Request ();
47
47
$ request ->setFormat ('jsonproblem ' , 'application/problem+json ' );
48
48
49
- $ expected = new Response ('' , Response::HTTP_BAD_REQUEST , [
50
- 'Content-Type ' => 'application/problem+json; charset=utf-8 ' ,
51
- 'X-Content-Type-Options ' => 'nosniff ' ,
52
- 'X-Frame-Options ' => 'deny ' ,
53
- ]);
54
-
55
- $ this ->assertEquals ($ expected , $ exceptionAction ($ flattenException , $ request ));
49
+ $ response = $ exceptionAction ($ flattenException , $ request );
50
+ $ this ->assertSame ('' , $ response ->getContent ());
51
+ $ this ->assertSame (Response::HTTP_BAD_REQUEST , $ response ->getStatusCode ());
52
+ $ this ->assertTrue ($ response ->headers ->contains ('Content-Type ' , 'application/problem+json; charset=utf-8 ' ));
53
+ $ this ->assertTrue ($ response ->headers ->contains ('X-Content-Type-Options ' , 'nosniff ' ));
54
+ $ this ->assertTrue ($ response ->headers ->contains ('X-Frame-Options ' , 'deny ' ));
56
55
}
57
56
58
57
public function testActionWithUncatchableException ()
You can’t perform that action at this time.
0 commit comments