Files
kimai2/tests/Command/InstallCommandTest.php
2021-03-08 16:06:22 +01:00

42 lines
1.0 KiB
PHP

<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Tests\Command;
use App\Command\InstallCommand;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Console\Command\Command;
/**
* @covers \App\Command\InstallCommand
* @group integration
*/
class InstallCommandTest extends KernelTestCase
{
/**
* @var Application
*/
protected $application;
protected function getCommand(): Command
{
$kernel = self::bootKernel();
$this->application = new Application($kernel);
$container = self::$kernel->getContainer();
$this->application->add(new InstallCommand(
$container->getParameter('kernel.project_dir'),
$container->get('doctrine')->getConnection()
));
return $this->application->find('kimai:install');
}
}