From 5a5e0c99b025510ffaa4f2d5267d191182cd49a1 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 26 Oct 2023 22:04:49 +0800 Subject: [PATCH] Simplify boostrapping stub Laravel application for Testing (#15) Signed-off-by: Mior Muhammad Zaki --- tests/Fixtures/artisan | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/Fixtures/artisan b/tests/Fixtures/artisan index be1b40a..89272ce 100644 --- a/tests/Fixtures/artisan +++ b/tests/Fixtures/artisan @@ -17,11 +17,13 @@ define('LARAVEL_START', microtime(true)); require __DIR__.'/../../vendor/autoload.php'; -$app = require_once __DIR__.'/../../vendor/orchestra/testbench-core/laravel/bootstrap/app.php'; - $_ENV['PAIL_TESTS'] = true; -$app->register(\Laravel\Pail\PailServiceProvider::class); +$app = Orchestra\Testbench\Foundation\Application::create( + resolvingCallback: function ($app) { + $app->register(Laravel\Pail\PailServiceProvider::class); + } +); /* |--------------------------------------------------------------------------