mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-08 23:59:28 +00:00
0bc0a09bf4
- 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
63 lines
1.4 KiB
PHP
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);
|
|
|
|
}
|
|
}
|