-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
namespace SimpleSAML\Module\monitor\Test; | ||
|
||
use Exception; | ||
use KRB5NegotiateAuth; | ||
use PHPUnit\Framework\Attributes\RequiresPhpExtension; | ||
use SimpleSAML\Module\monitor\State; | ||
|
@@ -29,10 +30,10 @@ public static function tearDownAfterClass(): void | |
public function testNegotiateException(): void | ||
{ | ||
$KRB5NegotiateAuthMock = $this->getMockBuilder(KRB5NegotiateAuth::class)->onlyMethods( | ||
['doAuthentication', 'getAuthenticatedUser'] | ||
['doAuthentication', 'getAuthenticatedUser'], | ||
)->disableOriginalConstructor()->getMock(); | ||
$KRB5NegotiateAuthMock->expects($this->any())->method('doAuthentication')->will( | ||
$this->throwException(new \Exception('Generic exception message')) | ||
$this->throwException(new Exception('Generic exception message')), | ||
); | ||
$testData = new TestData([ | ||
'handle' => $KRB5NegotiateAuthMock, | ||
|
@@ -46,11 +47,11 @@ public function testNegotiateException(): void | |
public function testNegotiateSuccess(): void | ||
{ | ||
$KRB5NegotiateAuthMock = $this->getMockBuilder(KRB5NegotiateAuth::class)->onlyMethods( | ||
['doAuthentication', 'getAuthenticatedUser'] | ||
['doAuthentication', 'getAuthenticatedUser'], | ||
)->disableOriginalConstructor()->getMock(); | ||
$KRB5NegotiateAuthMock->expects($this->any())->method('doAuthentication')->will($this->returnValue(true)); | ||
Check warning on line 52 in tests/src/TestCase/AuthSource/NegotiateTest.php GitHub Actions / Quality controlDeprecatedMethod
|
||
$KRB5NegotiateAuthMock->expects($this->any())->method('getAuthenticatedUser')->will( | ||
$this->returnValue('[email protected]') | ||
$this->returnValue('[email protected]'), | ||
Check warning on line 54 in tests/src/TestCase/AuthSource/NegotiateTest.php GitHub Actions / Quality controlDeprecatedMethod
|
||
); | ||
$testData = new TestData([ | ||
'handle' => $KRB5NegotiateAuthMock, | ||
|
@@ -64,7 +65,7 @@ public function testNegotiateSuccess(): void | |
public function testNegotiateNoAuthorzation(): void | ||
{ | ||
$KRB5NegotiateAuthMock = $this->getMockBuilder(KRB5NegotiateAuth::class)->onlyMethods( | ||
['doAuthentication', 'getAuthenticatedUser'] | ||
['doAuthentication', 'getAuthenticatedUser'], | ||
)->disableOriginalConstructor()->getMock(); | ||
$KRB5NegotiateAuthMock->expects($this->any())->method('doAuthentication')->will($this->returnValue(false)); | ||
Check warning on line 70 in tests/src/TestCase/AuthSource/NegotiateTest.php GitHub Actions / Quality controlDeprecatedMethod
|
||
$testData = new TestData([ | ||
|
@@ -79,7 +80,7 @@ public function testNegotiateNoAuthorzation(): void | |
public function testNegotiateError(): void | ||
{ | ||
$KRB5NegotiateAuthMock = $this->getMockBuilder(KRB5NegotiateAuth::class)->onlyMethods( | ||
['doAuthentication', 'getAuthenticatedUser'] | ||
['doAuthentication', 'getAuthenticatedUser'], | ||
)->disableOriginalConstructor()->getMock(); | ||
$KRB5NegotiateAuthMock->expects($this->any())->method('doAuthentication')->will($this->returnValue(false)); | ||
Check warning on line 85 in tests/src/TestCase/AuthSource/NegotiateTest.php GitHub Actions / Quality controlDeprecatedMethod
|
||
$testData = new TestData([ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters