mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
test folder refactoring
This commit is contained in:
58
tests/Domain/SetupWizard/SetupServiceTest.php
Normal file
58
tests/Domain/SetupWizard/SetupServiceTest.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Setup;
|
||||
|
||||
use App\Models\Language;
|
||||
use App\Models\Setting;
|
||||
use App\Services\SetupService;
|
||||
use Storage;
|
||||
use Tests\TestCase;
|
||||
|
||||
class SetupServiceTest extends TestCase
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->setup = app()->make(SetupService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function it_create_system_folders()
|
||||
{
|
||||
$this->setup->create_directories();
|
||||
|
||||
collect(['avatars', 'chunks', 'system', 'files', 'temp', 'zip'])
|
||||
->each(function ($directory) {
|
||||
Storage::disk('local')->assertExists($directory);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function it_seed_default_language()
|
||||
{
|
||||
Setting::create([
|
||||
'name' => 'license',
|
||||
'value' => 'Extended',
|
||||
]);
|
||||
|
||||
Language::create([
|
||||
'name' => 'English',
|
||||
'locale' => 'en'
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('languages', [
|
||||
'name' => 'English',
|
||||
'locale' => 'en',
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('language_translations', [
|
||||
'key' => 'actions.close',
|
||||
'value' => 'Close',
|
||||
'lang' => 'en',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user