Skip to content

Commit

Permalink
Fix case typo in filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubka committed Nov 9, 2024
1 parent fee7a68 commit 9c199dc
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Support\Facades\Log;

class storeIconsInDatabaseSettingChanged
class StoreIconsInDatabaseSettingChanged
{
use Dispatchable;

Expand All @@ -22,6 +22,6 @@ class storeIconsInDatabaseSettingChanged
public function __construct(bool $newValue)
{
$this->newValue = $newValue;
Log::info('storeIconsInDatabaseSettingChanged event dispatched');
Log::info('StoreIconsInDatabaseSettingChanged event dispatched');
}
}
4 changes: 2 additions & 2 deletions app/Listeners/ToggleIconReplicationToDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Listeners;

use App\Events\storeIconsInDatabaseSettingChanged;
use App\Events\StoreIconsInDatabaseSettingChanged;
use App\Facades\IconStore;

class ToggleIconReplicationToDatabase
Expand All @@ -15,7 +15,7 @@ public function __construct() {}
/**
* Handle the event.
*/
public function handle(storeIconsInDatabaseSettingChanged $event) : void
public function handle(StoreIconsInDatabaseSettingChanged $event) : void
{
IconStore::setDatabaseReplication($event->newValue);
}
Expand Down
4 changes: 2 additions & 2 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Events\GroupDeleted;
use App\Events\GroupDeleting;
use App\Events\ScanForNewReleaseCalled;
use App\Events\storeIconsInDatabaseSettingChanged;
use App\Events\StoreIconsInDatabaseSettingChanged;
use App\Events\TwoFAccountDeleted;
use App\Events\VisitedByProxyUser;
use App\Listeners\Authentication\FailedLoginListener;
Expand Down Expand Up @@ -71,7 +71,7 @@ class EventServiceProvider extends ServiceProvider
VisitedByProxyUser::class => [
VisitedByProxyUserListener::class,
],
storeIconsInDatabaseSettingChanged::class => [
StoreIconsInDatabaseSettingChanged::class => [
ToggleIconReplicationToDatabase::class,
],
];
Expand Down
4 changes: 2 additions & 2 deletions app/Services/SettingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Services;

use App\Events\storeIconsInDatabaseSettingChanged;
use App\Events\StoreIconsInDatabaseSettingChanged;
use App\Exceptions\DbEncryptionException;
use App\Models\Option;
use Exception;
Expand Down Expand Up @@ -79,7 +79,7 @@ public function set($setting, $value) : void
}

if ($setting === 'storeIconsInDatabase') {
storeIconsInDatabaseSettingChanged::dispatch($value);
StoreIconsInDatabaseSettingChanged::dispatch($value);
}

Option::updateOrCreate(['key' => $setting], ['value' => $this->replaceBoolean($value)]);
Expand Down
6 changes: 3 additions & 3 deletions tests/Feature/Services/SettingServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Tests\Feature\Services;

use App\Events\storeIconsInDatabaseSettingChanged;
use App\Events\StoreIconsInDatabaseSettingChanged;
use App\Exceptions\FailedIconStoreDatabaseTogglingException;
use App\Facades\IconStore;
use App\Facades\Settings;
Expand Down Expand Up @@ -370,12 +370,12 @@ public function test_cache_is_updated_when_setting_is_deleted()
public function test_set_storeIconsInDatabase_setting_dispatches_storeIconsInDatabaseSettingChanged()
{
Event::fake([
storeIconsInDatabaseSettingChanged::class,
StoreIconsInDatabaseSettingChanged::class,
]);

Settings::set('storeIconsInDatabase', true);

Event::assertDispatched(storeIconsInDatabaseSettingChanged::class);
Event::assertDispatched(StoreIconsInDatabaseSettingChanged::class);
}

#[Test]
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/Events/storeIconsInDatabaseSettingChangedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

namespace Tests\Unit\Events;

use App\Events\storeIconsInDatabaseSettingChanged;
use App\Events\StoreIconsInDatabaseSettingChanged;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;

/**
* storeIconsInDatabaseSettingChangedTest test class
*/
#[CoversClass(storeIconsInDatabaseSettingChanged::class)]
#[CoversClass(StoreIconsInDatabaseSettingChanged::class)]
class storeIconsInDatabaseSettingChangedTest extends TestCase
{
#[Test]
public function test_event_constructor()
{
$newValue = true;
$event = new storeIconsInDatabaseSettingChanged($newValue);
$event = new StoreIconsInDatabaseSettingChanged($newValue);

$this->assertSame($newValue, $event->newValue);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Listeners/ToggleIconReplicationToDatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Tests\Unit\Listeners;

use App\Events\storeIconsInDatabaseSettingChanged;
use App\Events\StoreIconsInDatabaseSettingChanged;
use App\Listeners\ToggleIconReplicationToDatabase;
use Illuminate\Support\Facades\Event;
use PHPUnit\Framework\Attributes\CoversClass;
Expand All @@ -21,7 +21,7 @@ public function test_ToggleIconReplicationToDatabase_listen_to_storeIconsInDatab
Event::fake();

Event::assertListening(
storeIconsInDatabaseSettingChanged::class,
StoreIconsInDatabaseSettingChanged::class,
ToggleIconReplicationToDatabase::class
);
}
Expand Down

0 comments on commit 9c199dc

Please sign in to comment.