File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
tests/DependencyInjection Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ public function getConfigTreeBuilder(): TreeBuilder
155155 ->enumNode ('max_request_body_size ' )
156156 ->values ([
157157 'none ' ,
158+ 'never ' ,
158159 'small ' ,
159160 'medium ' ,
160161 'always ' ,
Original file line number Diff line number Diff line change 66
77use Doctrine \Bundle \DoctrineBundle \DoctrineBundle ;
88use PHPUnit \Framework \TestCase ;
9+ use Sentry \Options ;
910use Sentry \SentryBundle \DependencyInjection \Configuration ;
1011use Symfony \Bundle \TwigBundle \TwigBundle ;
1112use Symfony \Component \Cache \CacheItem ;
@@ -276,4 +277,23 @@ private function processConfiguration(array $values): array
276277
277278 return $ processor ->processConfiguration (new Configuration (), ['sentry ' => $ values ]);
278279 }
280+
281+ /**
282+ * @dataProvider maxRequestBodySizeValuesDataProvider
283+ */
284+ public function testMaxRequestBodySizeValues (string $ maxRequestBodySize ): void
285+ {
286+ $ options = new Options ();
287+ $ options ->setMaxRequestBodySize ($ maxRequestBodySize );
288+ $ this ->assertSame ($ maxRequestBodySize , $ options ->getMaxRequestBodySize ());
289+ }
290+
291+ public function maxRequestBodySizeValuesDataProvider (): \Generator
292+ {
293+ yield ['never ' ];
294+ yield ['none ' ];
295+ yield ['small ' ];
296+ yield ['medium ' ];
297+ yield ['always ' ];
298+ }
279299}
You can’t perform that action at this time.
0 commit comments