diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 156b073f..d0282878 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -155,6 +155,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->enumNode('max_request_body_size') ->values([ 'none', + 'never', 'small', 'medium', 'always', diff --git a/tests/DependencyInjection/ConfigurationTest.php b/tests/DependencyInjection/ConfigurationTest.php index e9aed67e..6bc34499 100644 --- a/tests/DependencyInjection/ConfigurationTest.php +++ b/tests/DependencyInjection/ConfigurationTest.php @@ -6,6 +6,7 @@ use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; use PHPUnit\Framework\TestCase; +use Sentry\Options; use Sentry\SentryBundle\DependencyInjection\Configuration; use Symfony\Bundle\TwigBundle\TwigBundle; use Symfony\Component\Cache\CacheItem; @@ -276,4 +277,23 @@ private function processConfiguration(array $values): array return $processor->processConfiguration(new Configuration(), ['sentry' => $values]); } + + /** + * @dataProvider maxRequestBodySizeValuesDataProvider + */ + public function testMaxRequestBodySizeValues(string $maxRequestBodySize): void + { + $options = new Options(); + $options->setMaxRequestBodySize($maxRequestBodySize); + $this->assertSame($maxRequestBodySize, $options->getMaxRequestBodySize()); + } + + public function maxRequestBodySizeValuesDataProvider(): \Generator + { + yield ['never']; + yield ['none']; + yield ['small']; + yield ['medium']; + yield ['always']; + } }