3 class Sabre_DAV_Auth_MockBackend implements Sabre_DAV_Auth_IBackend {
5 protected $currentUser;
8 * @param Sabre_DAV_Server $server
10 * @throws Sabre_DAV_Exception_NotAuthenticated
12 function authenticate(Sabre_DAV_Server $server, $realm) {
14 if ($realm=='failme') throw new Sabre_DAV_Exception_NotAuthenticated('deliberate fail');
16 $this->currentUser = 'admin';
20 function setCurrentUser($user) {
22 $this->currentUser = $user;
26 function getCurrentUser() {
28 return $this->currentUser;