9 if (file_exists(SABRE_TEMPDIR .
'/filebackend')) unlink(SABRE_TEMPDIR .
'/filebackend');
16 $this->assertTrue($file instanceof
File);
25 file_put_contents(SABRE_TEMPDIR .
'/backend',
'user:realm:hash');
26 $file =
new File(SABRE_TEMPDIR .
'/backend');
32 file_put_contents(SABRE_TEMPDIR .
'/backend',
'user:realm:' . md5(
'user:realm:password'));
34 $file->loadFile(SABRE_TEMPDIR .
'/backend');
36 $this->assertFalse($file->getDigestHash(
'realm',
'blabla'));
37 $this->assertEquals(md5(
'user:realm:password'), $file->getDigestHash(
'realm',
'user'));
An exception for terminatinating execution or to throw for unit testing.
testLoadFileBroken()
@expectedException Sabre\DAV\Exception
This is an authentication backend that uses a file to manage passwords.