Copyright 2009-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Gunnar Wrobel (wrobel@pardus.de)
Inheritance: implements Horde_Kolab_Session_Valid
コード例 #1
0
ファイル: BaseTest.php プロジェクト: horde/horde
 public function testMethodIsvalidHasResultBooleanTrueIfTheMailOfTheCurrentUserMatchesTheCurrentUserOfTheSessionAndTheNewUserMatchesEitherTheCurrentUserMailAndUid()
 {
     $auth = '*****@*****.**';
     $session = $this->getMock('Horde_Kolab_Session');
     $session->expects($this->once())->method('getMail')->will($this->returnValue('*****@*****.**'));
     $valid = new Horde_Kolab_Session_Valid_Base($session, $auth);
     $this->assertTrue($valid->validate('*****@*****.**'));
 }
コード例 #2
0
ファイル: ValidTest.php プロジェクト: horde/horde
 public function testMethodIsvalidHasResultBooleanTrueIfTheMailOfTheCurrentUserMatchesTheCurrentUserOfTheSessionAndTheNewUserMatchesEitherTheCurrentUserMailAndUid()
 {
     $auth = '*****@*****.**';
     $this->user->expects($this->exactly(5))->method('getSingle')->will($this->returnValue('*****@*****.**'));
     $composite = $this->_getMockedComposite();
     $composite->objects->expects($this->once())->method('fetch')->will($this->returnValue($this->user));
     $session = new Horde_Kolab_Session_Base($composite, array());
     $session->connect('', array('password' => ''));
     $valid = new Horde_Kolab_Session_Valid_Base($session, $auth);
     $this->assertTrue($valid->validate('*****@*****.**'));
 }