mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 17:08:48 +00:00
Initial Release of the calendar plugin
This commit is contained in:
parent
45cc9885fc
commit
7115197a33
561 changed files with 189494 additions and 0 deletions
40
dav/SabreDAV/tests/Sabre/DAV/Auth/Backend/FileTest.php
Normal file
40
dav/SabreDAV/tests/Sabre/DAV/Auth/Backend/FileTest.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
class Sabre_DAV_Auth_Backend_FileTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
function tearDown() {
|
||||
|
||||
if (file_exists(SABRE_TEMPDIR . '/filebackend')) unlink(SABRE_TEMPDIR .'/filebackend');
|
||||
|
||||
}
|
||||
|
||||
function testConstruct() {
|
||||
|
||||
$file = new Sabre_DAV_Auth_Backend_File();
|
||||
$this->assertTrue($file instanceof Sabre_DAV_Auth_Backend_File);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Sabre_DAV_Exception
|
||||
*/
|
||||
function testLoadFileBroken() {
|
||||
|
||||
file_put_contents(SABRE_TEMPDIR . '/backend','user:realm:hash');
|
||||
$file = new Sabre_DAV_Auth_Backend_File();
|
||||
$file->loadFile(SABRE_TEMPDIR .'/backend');
|
||||
|
||||
}
|
||||
|
||||
function testLoadFile() {
|
||||
|
||||
file_put_contents(SABRE_TEMPDIR . '/backend','user:realm:' . md5('user:realm:password'));
|
||||
$file = new Sabre_DAV_Auth_Backend_File();
|
||||
$file->loadFile(SABRE_TEMPDIR . '/backend');
|
||||
|
||||
$this->assertFalse($file->getDigestHash('realm','blabla'));
|
||||
$this->assertEquals(md5('user:realm:password'), $file->getDigesthash('realm','user'));
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue