chore: code refactor via rector
This commit is contained in:
@@ -8,7 +8,7 @@ use Tests\TestCase;
|
||||
class SettingTest extends TestCase
|
||||
{
|
||||
/** @test */
|
||||
public function it_can_create_a_setting_with_factory()
|
||||
public function it_can_create_a_setting_with_factory(): void
|
||||
{
|
||||
$setting = Setting::factory()->create();
|
||||
|
||||
@@ -18,7 +18,7 @@ class SettingTest extends TestCase
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_has_correct_fillable_attributes()
|
||||
public function it_has_correct_fillable_attributes(): void
|
||||
{
|
||||
$settingData = [
|
||||
'app_name' => 'ZEmailnator',
|
||||
@@ -28,7 +28,7 @@ class SettingTest extends TestCase
|
||||
'app_title' => 'Test Title',
|
||||
];
|
||||
|
||||
$setting = Setting::create($settingData);
|
||||
$setting = Setting::query()->create($settingData);
|
||||
|
||||
foreach ($settingData as $key => $value) {
|
||||
$this->assertEquals($value, $setting->$key);
|
||||
@@ -36,7 +36,7 @@ class SettingTest extends TestCase
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_stores_configuration_values()
|
||||
public function it_stores_configuration_values(): void
|
||||
{
|
||||
$setting = Setting::factory()->create([
|
||||
'app_name' => 'Test App',
|
||||
@@ -54,10 +54,10 @@ class SettingTest extends TestCase
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_can_query_public_settings()
|
||||
public function it_can_query_public_settings(): void
|
||||
{
|
||||
$setting1 = Setting::factory()->create(['app_name' => 'Public App']);
|
||||
$setting2 = Setting::factory()->create(['app_name' => 'Private App']);
|
||||
Setting::factory()->create(['app_name' => 'Public App']);
|
||||
Setting::factory()->create(['app_name' => 'Private App']);
|
||||
|
||||
$allSettings = Setting::all();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user