mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
adjust test
This commit is contained in:
parent
f26ba5846d
commit
c0edb639ed
1 changed files with 13 additions and 2 deletions
|
|
@ -52,9 +52,20 @@ class Session extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testLoginValidPasswordEnabled() {
|
||||
$session = $this->getMock('\OC\Session\Memory', array(), array(''));
|
||||
$session->expects($this->once())
|
||||
$session->expects($this->exactly(2))
|
||||
->method('set')
|
||||
->with('user_id', 'foo');
|
||||
->with($this->callback(function($key) {
|
||||
switch($key) {
|
||||
case 'user_id':
|
||||
case 'loginname':
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
},
|
||||
'foo'));
|
||||
|
||||
$manager = $this->getMock('\OC\User\Manager');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue