Files
monica/tests/Traits/CreatesApplication.php
T
2020-03-20 08:17:59 +01: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;
}
}