Files
kimai2/tests/Command/MailTestCommandTest.php
2025-07-04 16:43:38 +02:00

41 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\MailTestCommand;
use Psr\EventDispatcher\EventDispatcherInterface;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
/**
* @covers \App\Command\MailTestCommand
* @group integration
*/
class MailTestCommandTest extends KernelTestCase
{
protected Application $application;
protected function setUp(): void
{
parent::setUp();
$kernel = self::bootKernel();
$this->application = new Application($kernel);
$this->application->add(new MailTestCommand(
$this->createMock(EventDispatcherInterface::class)
));
}
public function testCommandName(): void
{
$command = $this->application->find('kimai:mail:test');
self::assertInstanceOf(MailTestCommand::class, $command);
}
}