mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 09:34:50 +02:00
5517d4061e
* feat(admin): add settings to override config values * style: fix StyleCI findings * refactor: use model constants in migration
42 lines
758 B
PHP
42 lines
758 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\Models\Admin;
|
|
|
|
use App\Models\Admin\Setting;
|
|
use Illuminate\Support\Facades\Config;
|
|
use Tests\TestCase;
|
|
|
|
/**
|
|
* Class SettingTest.
|
|
*/
|
|
class SettingTest extends TestCase
|
|
{
|
|
/**
|
|
* Setting shall be auditable.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function testAuditable(): void
|
|
{
|
|
Config::set('audit.console', true);
|
|
|
|
$setting = Setting::factory()->createOne();
|
|
|
|
static::assertEquals(1, $setting->audits()->count());
|
|
}
|
|
|
|
/**
|
|
* Settings shall be nameable.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function testNameable(): void
|
|
{
|
|
$setting = Setting::factory()->createOne();
|
|
|
|
static::assertIsString($setting->getName());
|
|
}
|
|
}
|