Run tests in no debug mode

This commit is contained in:
Yassine Guedidi 2024-02-24 02:34:46 +01:00
parent 65ed401296
commit 6d38e0533f
4 changed files with 10 additions and 1 deletions

View file

@ -125,6 +125,9 @@ fos_rest:
# for an unknown reason, EACH REQUEST goes to FOS\RestBundle\EventListener\FormatListener
# so we need to add custom rule for custom api export but also for all other routes of the application...
- { path: '^/', priorities: ['text/html', '*/*'], fallback_format: html, prefer_extension: false }
exception:
messages:
Symfony\Component\HttpKernel\Exception\BadRequestHttpException: true
nelmio_api_doc:
areas:

View file

@ -16,6 +16,8 @@
<php>
<ini name="error_reporting" value="-1" />
<server name="KERNEL_CLASS" value="AppKernel" />
<server name="APP_ENV" value="test" />
<server name="APP_DEBUG" value="0" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>

View file

@ -528,7 +528,7 @@ class EntryRestController extends WallabagRestController
$limit = $this->getParameter('wallabag.api_limit_mass_actions');
if (\count($urls) > $limit) {
throw new HttpException(400, 'API limit reached');
throw new BadRequestHttpException('API limit reached');
}
$results = [];

View file

@ -14,6 +14,7 @@ if (!isPartialRun()) {
'doctrine:database:drop',
'--force',
'--env=test',
'--no-debug',
]))->run(function ($type, $buffer) {
echo $buffer;
});
@ -23,6 +24,7 @@ if (!isPartialRun()) {
__DIR__ . '/../bin/console',
'doctrine:database:create',
'--env=test',
'--no-debug',
]))->mustRun(function ($type, $buffer) {
echo $buffer;
});
@ -33,6 +35,7 @@ if (!isPartialRun()) {
'doctrine:migrations:migrate',
'--no-interaction',
'--env=test',
'--no-debug',
'-vv',
]))->mustRun(function ($type, $buffer) {
echo $buffer;
@ -45,6 +48,7 @@ if (!isPartialRun()) {
'doctrine:fixtures:load',
'--no-interaction',
'--env=test',
'--no-debug',
]))->mustRun(function ($type, $buffer) {
echo $buffer;
});