mirror of
https://github.com/Dannecron/coverage-merger.git
synced 2025-12-25 15:52:34 +03:00
add tests
This commit is contained in:
20
tests/Helpers/Traits/MakeCliApplication.php
Normal file
20
tests/Helpers/Traits/MakeCliApplication.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user