8000 modify functional test to check for returned error codes · symfony/symfony@3dfcc8e · GitHub
[go: up one dir, main page]

Skip to content

Commit 3dfcc8e

Browse files
committed
modify functional test to check for returned error codes
1 parent 5ddb618 commit 3dfcc8e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TranslationDebugCommandTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
1313

1414
use Symfony\Bundle\FrameworkBundle\Console\Application;
15+
use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617

1718
/**
@@ -32,7 +33,11 @@ public function testDumpAllTrans()
3233
$tester = $this->createCommandTester();
3334
$ret = $tester->execute(['locale' => 'en']);
3435

35-
$this->assertSame(0, $ret, 'Returns 0 in case of success');
36+
$this->assertSame(
37+
TranslationDebugCommand::EXIT_CODE_MISSING | TranslationDebugCommand::EXIT_CODE_UNUSED,
38+
$ret,
39+
'Returns appropriate exit code in the event of error'
40+
);
3641
$this->assertStringContainsString('missing messages hello_from_construct_arg_service', $tester->getDisplay());
3742
$this->assertStringContainsString('missing messages hello_from_subscriber_service', $tester->getDisplay());
3843
$this->assertStringContainsString('missing messages hello_from_property_service', $tester->getDisplay());

0 commit comments

Comments
 (0)
0