moved deprecated communityhome, dav and yourls to the deprecated-addons repository

This commit is contained in:
Tobias Diekershoff 2018-06-02 11:23:11 +02:00
commit 31520f804d
675 changed files with 195144 additions and 0 deletions

View file

@ -0,0 +1,50 @@
<?php
/**
* iMIP handler.
*
* This class is responsible for sending out iMIP messages. iMIP is the
* email-based transport for iTIP. iTIP deals with scheduling operations for
* iCalendar objects.
*
* If you want to customize the email that gets sent out, you can do so by
* extending this class and overriding the sendMessage method.
*
* @package Sabre
* @subpackage CalDAV
* @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
class Sabre_CalDAV_Schedule_IMip_Mock extends Sabre_CalDAV_Schedule_IMip {
protected $emails = array();
/**
* This function is reponsible for sending the actual email.
*
* @param string $to Recipient email address
* @param string $subject Subject of the email
* @param string $body iCalendar body
* @param array $headers List of headers
* @return void
*/
protected function mail($to, $subject, $body, array $headers) {
$this->emails[] = array(
'to' => $to,
'subject' => $subject,
'body' => $body,
'headers' => $headers,
);
}
public function getSentEmails() {
return $this->emails;
}
}

View file

@ -0,0 +1,58 @@
<?php
class Sabre_CalDAV_Schedule_OutboxTest extends PHPUnit_Framework_TestCase {
function testSetup() {
$outbox = new Sabre_CalDAV_Schedule_Outbox('principals/user1');
$this->assertEquals('outbox', $outbox->getName());
$this->assertEquals(array(), $outbox->getChildren());
$this->assertEquals('principals/user1', $outbox->getOwner());
$this->assertEquals(null, $outbox->getGroup());
$this->assertEquals(array(
array(
'privilege' => '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy',
'principal' => 'principals/user1',
'protected' => true,
),
array(
'privilege' => '{DAV:}read',
'principal' => 'principals/user1',
'protected' => true,
),
), $outbox->getACL());
$ok = false;
try {
$outbox->setACL(array());
} catch (Sabre_DAV_Exception_MethodNotAllowed $e) {
$ok = true;
}
if (!$ok) {
$this->fail('Exception was not emitted');
}
}
function testGetSupportedPrivilegeSet() {
$outbox = new Sabre_CalDAV_Schedule_Outbox('principals/user1');
$r = $outbox->getSupportedPrivilegeSet();
$ok = false;
foreach($r['aggregates'] as $priv) {
if ($priv['privilege'] == '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy') {
$ok = true;
}
}
if (!$ok) {
$this->fail('{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}schedule-query-freebusy was not found as a supported privilege');
}
}
}