Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Make SessionGuard::onceUsingId() return user instance #13434

Merged
merged 1 commit into from
May 5, 2016
Merged

[5.3] Make SessionGuard::onceUsingId() return user instance #13434

merged 1 commit into from
May 5, 2016

Conversation

vlakoff
Copy link
Contributor

@vlakoff vlakoff commented May 5, 2016

For consistency with loginUsingId. As $user == true this change shouldn't affect BC much.

@taylorotwell taylorotwell merged commit b880147 into laravel:master May 5, 2016
@@ -282,7 +282,7 @@ public function testOnceUsingIdSetsUser()
$guard->getProvider()->shouldReceive('retrieveById')->once()->with(10)->andReturn($user);
$guard->shouldReceive('setUser')->once()->with($user);

$this->assertTrue($guard->onceUsingId(10));
$this->assertEquals($user, $guard->onceUsingId(10));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertSame would be better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrahamCampbell Agree. Do you want to make the change? (lines 262 and 285)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact there are a few other occurrences of assertEquals($user, ...) in this file. Not really worth bothering about this, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants