diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-12-13 12:56:06 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-12-13 16:58:23 +0100 |
commit | c0edb639edbc96b97268cebf28c8d5fc22f7fd8d (patch) | |
tree | 6ff87ed1547a10ceb1a100511fb5bac91f2bc711 /tests/lib/user/session.php | |
parent | f26ba5846d6859714e2f32f8f3625e57855ea703 (diff) | |
download | nextcloud-server-c0edb639edbc96b97268cebf28c8d5fc22f7fd8d.tar.gz nextcloud-server-c0edb639edbc96b97268cebf28c8d5fc22f7fd8d.zip |
adjust test
Diffstat (limited to 'tests/lib/user/session.php')
-rw-r--r-- | tests/lib/user/session.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/lib/user/session.php b/tests/lib/user/session.php index e457a7bda30..46b268b3624 100644 --- a/tests/lib/user/session.php +++ b/tests/lib/user/session.php @@ -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'); |