++ fix e controlli
This commit is contained in:
24
tests/TestCase.php
Normal file
24
tests/TestCase.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
/**
|
||||
* L'applicazione si costruisce dallo stesso bootstrap/app.php che usa il
|
||||
* runtime: middleware, provider e rotte sono quelli veri, cosi' un test non
|
||||
* puo' passare grazie a una configurazione che esiste solo nei test.
|
||||
*/
|
||||
public function createApplication(): Application
|
||||
{
|
||||
$app = require __DIR__ . '/../bootstrap/app.php';
|
||||
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
|
||||
return $app;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user