Skip to content
Permalink
Browse files

formatting

  • Loading branch information...
taylorotwell committed Mar 13, 2019
1 parent 7e6c443 commit 5e87f2df072ec4a243b6a3a983a753e8ffa5e6bf
@@ -4,7 +4,7 @@
use Illuminate\Queue\SerializesModels;
class LogoutOtherDevices
class OtherDeviceLogout
{
use SerializesModels;
@@ -552,7 +552,7 @@ public function logoutOtherDevices($password, $attribute = 'password')
$this->queueRecallerCookie($this->user());
$this->fireLogoutOtherDevicesEvent($this->user());
$this->fireOtherDeviceLogoutEvent($this->user());
return $result;
}
@@ -618,15 +618,15 @@ protected function fireAuthenticatedEvent($user)
}
/**
* Fire the logout other devices event if the dispatcher is set.
* Fire the other device logout event if the dispatcher is set.
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
protected function fireLogoutOtherDevicesEvent($user)
protected function fireOtherDeviceLogoutEvent($user)
{
if (isset($this->events)) {
$this->events->dispatch(new Events\LogoutOtherDevices(
$this->events->dispatch(new Events\OtherDeviceLogout(
$this->name, $user
));
}
@@ -13,7 +13,7 @@
use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Auth\Events\Authenticated;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Auth\Events\LogoutOtherDevices;
use Illuminate\Auth\Events\OtherDeviceLogout;
use Illuminate\Tests\Integration\Auth\Fixtures\AuthenticationTestUser;
/**
@@ -199,7 +199,7 @@ public function test_logging_out_other_devices()
$this->app['auth']->logoutOtherDevices('adifferentpassword');
$this->assertEquals(1, $user->id);
Event::assertDispatched(LogoutOtherDevices::class, function ($event) {
Event::assertDispatched(OtherDeviceLogout::class, function ($event) {
$this->assertEquals('web', $event->guard);
$this->assertEquals(1, $event->user->id);

0 comments on commit 5e87f2d

Please sign in to comment.
You can’t perform that action at this time.