Skip to content
Snippets Groups Projects
Commit d73cdb3e authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Psalm: fix UndefinedMethod (2x)

parent 1071c4a2
No related branches found
No related tags found
No related merge requests found
...@@ -29,12 +29,12 @@ class UserPassBaseTest extends TestCase ...@@ -29,12 +29,12 @@ class UserPassBaseTest extends TestCase
->setMethods(['login']) ->setMethods(['login'])
->getMockForAbstractClass(); ->getMockForAbstractClass();
/** @var \SimpleSAML\Module\core\Auth\UserPassBase $stub */
$stub->expects($this->once()) $stub->expects($this->once())
->method('login') ->method('login')
->with($username, $password) ->with($username, $password)
->will($this->returnValue($attributes)); ->will($this->returnValue($attributes));
/** @var \SimpleSAML\Module\core\Auth\UserPassBase $stub */
$stub->authenticate($state); $stub->authenticate($state);
$this->assertSame($attributes, $state['Attributes']); $this->assertSame($attributes, $state['Attributes']);
...@@ -56,11 +56,11 @@ class UserPassBaseTest extends TestCase ...@@ -56,11 +56,11 @@ class UserPassBaseTest extends TestCase
unset($_SERVER['PHP_AUTH_USER']); unset($_SERVER['PHP_AUTH_USER']);
$_SERVER['PHP_AUTH_PW'] = 'password'; $_SERVER['PHP_AUTH_PW'] = 'password';
/** @var \SimpleSAML\Module\core\Auth\UserPassBase $stub */
$stub = $this->getMockBuilder(UserPassBase::class) $stub = $this->getMockBuilder(UserPassBase::class)
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMockForAbstractClass(); ->getMockForAbstractClass();
/** @var \SimpleSAML\Module\core\Auth\UserPassBase $stub */
$stub->authenticate($state); $stub->authenticate($state);
} }
...@@ -84,6 +84,7 @@ class UserPassBaseTest extends TestCase ...@@ -84,6 +84,7 @@ class UserPassBaseTest extends TestCase
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMockForAbstractClass(); ->getMockForAbstractClass();
/** @var \SimpleSAML\Module\core\Auth\UserPassBase $stub */
$stub->authenticate($state); $stub->authenticate($state);
} }
...@@ -108,12 +109,12 @@ class UserPassBaseTest extends TestCase ...@@ -108,12 +109,12 @@ class UserPassBaseTest extends TestCase
->setMethods(['login']) ->setMethods(['login'])
->getMockForAbstractClass(); ->getMockForAbstractClass();
/** @var \SimpleSAML\Module\core\Auth\UserPassBase $stub */
$stub->expects($this->once()) $stub->expects($this->once())
->method('login') ->method('login')
->with($forcedUsername, $password) ->with($forcedUsername, $password)
->will($this->returnValue($attributes)); ->will($this->returnValue($attributes));
/** @var \SimpleSAML\Module\core\Auth\UserPassBase $stub */
$stub->setForcedUsername($forcedUsername); $stub->setForcedUsername($forcedUsername);
$stub->authenticate($state); $stub->authenticate($state);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment