@@ -48,7 +48,6 @@ public function testDoesNothingWhenSupportedMediaTypesParameterIsEmpty(): void
4848 $ event = new RequestEvent ($ this ->kernel , $ request , HttpKernelInterface::MAIN_REQUEST );
4949
5050 $ subscriber ->allowOnlySupportedMediaTypes ($ event );
51-
5251 self ::expectNotToPerformAssertions ();
5352 }
5453
@@ -57,8 +56,7 @@ public function testDoesNothingWhenMediaTypeIsSupported(): void
5756 $ request = new Request ();
5857 $ request ->attributes ->set ('supported_media_types ' , ['json ' , 'xml ' ]);
5958 $ request ->headers = new HeaderBag ([
60- 'Content-Type ' => 'application/vnd.ibexa.api.ContentCreat+json ' ,
61- 'Accept ' => 'application/vnd.ibexa.api.ContentCreat+json ' ,
59+ 'Content-Type ' => 'application/vnd.ibexa.api.ContentCreate+json ' ,
6260 ]);
6361
6462 $ subscriber = new SupportedMediaTypesSubscriber ();
@@ -84,28 +82,12 @@ public function testThrowsExceptionWhenContentTypeHeaderTypeIsNotSupported(): vo
8482 $ subscriber ->allowOnlySupportedMediaTypes ($ event );
8583 }
8684
87- public function testThrowsExceptionWhenAcceptHeaderTypeIsNotSupported (): void
88- {
89- $ request = new Request ();
90- $ request ->attributes ->set ('supported_media_types ' , ['json ' ]);
91- $ request ->headers = new HeaderBag ([
92- 'Accept ' => 'application/vnd.ibexa.api.ContentCreate+xml ' ,
93- ]);
94-
95- $ subscriber = new SupportedMediaTypesSubscriber ();
96- $ event = new RequestEvent ($ this ->kernel , $ request , HttpKernelInterface::MAIN_REQUEST );
97-
98- $ this ->expectException (UnsupportedMediaTypeHttpException::class);
99- $ subscriber ->allowOnlySupportedMediaTypes ($ event );
100- }
101-
10285 public function testThrowsExceptionWhenUnknownMediaTypeIsUsed (): void
10386 {
10487 $ request = new Request ();
10588 $ request ->attributes ->set ('supported_media_types ' , ['yaml ' ]);
10689 $ request ->headers = new HeaderBag ([
10790 'Content-Type ' => 'application/vnd.ibexa.api.ContentCreate+unknown ' ,
108- 'Accept ' => 'application/vnd.ibexa.api.ContentCreate+unknown ' ,
10991 ]);
11092
11193 $ subscriber = new SupportedMediaTypesSubscriber ();
0 commit comments