Skip to content

Commit

Permalink
fix(partners): Fix Laravel 11 Compatibility- Implement `getAuthPasswo…
Browse files Browse the repository at this point in the history
…rdName()` Method in OAuthUser Model (#35)

Fix error in OAuthUser Model missing implementation method on Authenticatable it was changed on laravel 11
  • Loading branch information
salzebari authored Dec 17, 2024
1 parent 45eb944 commit bd6dce0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Models/OAuthUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public function getAuthPassword()
throw new \BadMethodCallException('Not available for OAuth users');
}

public function getAuthPasswordName()
{
throw new \BadMethodCallException('Not available for OAuth users');
}

public function getRememberToken()
{
throw new \BadMethodCallException('Not available for OAuth users');
Expand Down
6 changes: 6 additions & 0 deletions test/OAuthUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ public function testGetAuthPasswordThrowsException()
$this->oauthUser->getAuthPassword();
}

public function testGetAuthPasswordNameThrowsException()
{
$this->expectException(\BadMethodCallException::class);
$this->oauthUser->getAuthPasswordName();
}

public function testGetRememberTokenThrowsException()
{
$this->expectException(\BadMethodCallException::class);
Expand Down

0 comments on commit bd6dce0

Please sign in to comment.