[Pkg-owncloud-commits] [owncloud] 13/32: adjust test
David Prévot
taffit at moszumanska.debian.org
Sun Dec 15 01:47:32 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit ab8691d84b3c3a1a71755104e1f528a74e177a3e
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Fri Dec 13 12:56:06 2013 +0100
adjust test
---
tests/lib/user/session.php | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/tests/lib/user/session.php b/tests/lib/user/session.php
index e457a7b..46b268b 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');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list