add tests

This commit is contained in:
2023-09-21 14:58:17 +07:00
parent 82f26e10e9
commit 530b2ff6c9
23 changed files with 794 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?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;
}
}