Files
FHC-Core/include/sabredav/tests/Sabre/CalDAV/ShareableCalendarTest.php
T
Paolo 0bc0a09bf4 - Removed file system execute permission for all files (no directories)
- application/extensions file system permission now is 775
- application/logs file system permission now is 775
- Added extensions directory in application/: config, controllers, helpers, hooks, libraries, models, views and widgets
- Added view views/extensions/manage.php
- Added controller controllers/system/extensions/Manager.php
- Added library ExtensionsLib to manage extensions
- Added model models/system/Extensions_model.php
- Moved code related to print out info from MigrationLib to EPrintfLib
2017-11-13 10:45:49 +01:00

63 lines
1.4 KiB
PHP

<?php
namespace Sabre\CalDAV;
use Sabre\DAVACL;
class ShareableCalendarTest extends \PHPUnit_Framework_TestCase {
protected $backend;
protected $instance;
function setUp() {
$props = array(
'id' => 1,
);
$this->backend = new Backend\Mock(
array($props),
array(),
array()
);
$this->backend->updateShares(1, array(
array(
'href' => 'mailto:removeme@example.org',
'commonName' => 'To be removed',
'readOnly' => true,
),
), array());
$this->instance = new ShareableCalendar($this->backend, $props);
}
function testUpdateShares() {
$this->instance->updateShares(array(
array(
'href' => 'mailto:test@example.org',
'commonName' => 'Foo Bar',
'summary' => 'Booh',
'readOnly' => false,
),
), array('mailto:removeme@example.org'));
$this->assertEquals(array(array(
'href' => 'mailto:test@example.org',
'commonName' => 'Foo Bar',
'summary' => 'Booh',
'readOnly' => false,
'status' => SharingPlugin::STATUS_NORESPONSE,
)), $this->instance->getShares());
}
function testPublish() {
$this->instance->setPublishStatus(true);
$this->instance->setPublishStatus(false);
}
}