Files
coverage-merger/tests/Helpers/Traits/MakeCliApplication.php
2023-09-21 14:58:17 +07:00

21 lines
409 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Helpers\Traits;
use Ahc\Cli\Application;
trait MakeCliApplication
{
protected function makeCliApp(): Application
{
$cliApp = new \Ahc\Cli\Application('test', '0.0.1', static fn () => true);
$cliApp->onException(static function (\Throwable $exception): void {
throw $exception;
});
return $cliApp;
}
}