Files
kimai2/tests/Command/InstallCommandTest.php
Kevin Papst 96043afd6a better support for installing plugins via composer (#5112)
* merge installation and update commands
* generate metadata from array
* new command to list available packages
* added a management script to simplify updates
* added directory for dev files
* helper functions for installation and listing of packages
* run plugin database installers
2024-10-14 21:44:42 +02: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;
/**
* @covers \App\Command\InstallCommand
* @group integration
*/
class InstallCommandTest extends KernelTestCase
{
private Application $application;
protected function setUp(): void
{
parent::setUp();
$kernel = self::bootKernel();
$this->application = new Application($kernel);
$container = self::$kernel->getContainer();
$this->application->add(new InstallCommand(
$container->get('doctrine')->getConnection()
));
}
public function testCommandName(): void
{
$command = $this->application->find('kimai:install');
self::assertInstanceOf(InstallCommand::class, $command);
}
}