mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Correzioni minori e aggiornamento a Laravel 9
This commit is contained in:
40
app/LaravelGettext/Testing/BaseTestCase.php
Normal file
40
app/LaravelGettext/Testing/BaseTestCase.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php namespace App\LaravelGettext\Testing;
|
||||
|
||||
use \Illuminate\Foundation\Testing\TestCase;
|
||||
use App\LaravelGettext\LaravelGettextServiceProvider;
|
||||
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: shaggyz
|
||||
* Date: 17/10/16
|
||||
* Time: 14:41
|
||||
*/
|
||||
class BaseTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* Base app path
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $appPath;
|
||||
|
||||
/**
|
||||
* Instantiates the laravel environment.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function createApplication()
|
||||
{
|
||||
// relative path in package folder
|
||||
if (!$this->appPath) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$app = require $this->appPath;
|
||||
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
|
||||
$app->register(LaravelGettextServiceProvider::class);
|
||||
|
||||
return $app;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user