mercredi 17 juillet 2019

$app->make(Kernel::class)->bootstrap(); on tests/CreatesApplication.php printing emptyline

This file is on tests/CreatesApplication.php


namespace Tests;

use Illuminate\Contracts\Console\Kernel;
use Illuminate\Support\Facades\DB;

trait CreatesApplication
{
    /**
     * Creates the application.
     *
     * @return \Illuminate\Foundation\Application
     */
    public function createApplication()
    {
        $app = require __DIR__ . '/../bootstrap/app.php';
        $app->loadEnvironmentFrom('.env.testing');
        $app->make(Kernel::class)->bootstrap();

        $this->afterApplicationCreated(function () {
            DB::connection('mysql')->statement('SET FOREIGN_KEY_CHECKS=0;');
        });
        return $app;
    }
}

Why this code $app->make(Kernel::class)->bootstrap(); is printing a empty line, everytime it is called when I'm running phpunit?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire