Files
CRM/tests/Traits/CreatesApplication.php
Kroonk a213a1dba0
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
refactor: replace custom CRM with Monica fork
2026-05-22 16:19:55 +02:00

31 lines
656 B
PHP

<?php
namespace Tests\Traits;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Hash;
use Illuminate\Contracts\Console\Kernel;
trait CreatesApplication
{
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__.'/../../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
App::setLocale('en');
// set the bcrypt hashing rounds (the minimum allowed).
// this reduces the amount of cycles needed to manage users.
Hash::setRounds(4);
return $app;
}
}