Skip to content

Commit f254e14

Browse files
authored
Merge pull request #2770 from teohhanhui/fix/test-app-console
Fix the test app/console binary
2 parents 79bd9b3 + 96e06de commit f254e14

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.php_cs.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ HEADER;
1313

1414
$finder = PhpCsFixer\Finder::create()
1515
->in(__DIR__)
16-
->exclude('tests/Fixtures/app/var');
16+
->exclude('tests/Fixtures/app/var')
17+
->append([
18+
'tests/Fixtures/app/console',
19+
]);
1720

1821
return PhpCsFixer\Config::create()
1922
->setRiskyAllowed(true)

phpstan.neon.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ parameters:
99
paths:
1010
- src
1111
- tests
12+
- tests/Fixtures/app/console
1213
symfony:
1314
container_xml_path: %rootDir%/../../../tests/Fixtures/app/var/cache/test/appAppKernelTestDebugContainer.xml
1415
constant_hassers: false

tests/Fixtures/app/console

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ require_once __DIR__.'/bootstrap.php';
1111
require_once __DIR__.'/AppKernel.php';
1212

1313
$input = new ArgvInput();
14-
$env = $input->getParameterOption(array('--env', '-e'), $_SERVER['APP_ENV'] ?? 'test');
15-
$debug = $_SERVER['APP_DEBUG'] ?? 0 && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
14+
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'test', true);
15+
$debug = ($_SERVER['APP_DEBUG'] ?? false) && !$input->hasParameterOption('--no-debug', true) && 'prod' !== $env;
1616

1717
if ($debug) {
1818
Debug::enable();

0 commit comments

Comments
 (0)