Contao\CoreBundle\Test\Command\VersionCommandTest::testOutput PHP Method

testOutput() public method

Tests the output.
public testOutput ( )
    public function testOutput()
    {
        $container = new ContainerBuilder();
        $container->setParameter('kernel.packages', ['contao/core-bundle' => '4.0.2']);
        $command = new VersionCommand('contao:version');
        $command->setContainer($container);
        $tester = new CommandTester($command);
        $code = $tester->execute([]);
        $this->assertEquals(0, $code);
        $this->assertContains('4.0.2', $tester->getDisplay());
    }