blessing-skin-server/tests/TestCase.php

42 lines
884 B
PHP
Raw Normal View History

2017-10-26 23:24:33 +08:00
<?php
2018-08-17 15:25:08 +08:00
namespace Tests;
use Artisan;
class TestCase extends \Illuminate\Foundation\Testing\TestCase
2017-10-26 23:24:33 +08:00
{
/**
* The base URL to use while testing the application.
*
* @var string
*/
protected $baseUrl = 'http://localhost';
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
2018-08-17 15:25:08 +08:00
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
2017-10-26 23:24:33 +08:00
2017-11-09 12:09:41 +08:00
Artisan::call('migrate:refresh');
2019-12-25 15:08:07 +08:00
if (!file_exists(storage_path('install.lock'))) {
file_put_contents(storage_path('install.lock'), '');
2019-09-06 23:53:47 +08:00
}
2017-10-26 23:24:33 +08:00
return $app;
}
2019-09-07 17:18:58 +08:00
protected function setUp(): void
{
parent::setUp();
$this->spy(\App\Services\Translations\JavaScript::class);
}
2017-10-26 23:24:33 +08:00
}