diff options
author | Mario <mario@mariovavti.com> | 2019-12-04 10:25:11 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-12-04 10:25:11 +0000 |
commit | bde429cff649237984903a252ba1a718e6d74f53 (patch) | |
tree | b2b2570159cfb37689e6ce3b96c3b1b988d676cc /vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php | |
parent | cc9f41df5f83bcab435d6fb941b5a8f5b1457037 (diff) | |
parent | 4c8d33d1eb2a804aa70a7bc677d6c73d0d94816b (diff) | |
download | volse-hubzilla-bde429cff649237984903a252ba1a718e6d74f53.tar.gz volse-hubzilla-bde429cff649237984903a252ba1a718e6d74f53.tar.bz2 volse-hubzilla-bde429cff649237984903a252ba1a718e6d74f53.zip |
Merge branch '4.6RC'4.6
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php index 6c6e02da8..cb19ef962 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php @@ -1,69 +1,66 @@ <?php +declare(strict_types=1); + namespace Sabre\CalDAV\Notifications; use Sabre\CalDAV; -class NodeTest extends \PHPUnit_Framework_TestCase { - +class NodeTest extends \PHPUnit\Framework\TestCase +{ protected $systemStatus; protected $caldavBackend; - function getInstance() { - + public function getInstance() + { $principalUri = 'principals/user1'; $this->systemStatus = new CalDAV\Xml\Notification\SystemStatus(1, '"1"'); $this->caldavBackend = new CalDAV\Backend\MockSharing([], [], [ 'principals/user1' => [ - $this->systemStatus - ] + $this->systemStatus, + ], ]); $node = new Node($this->caldavBackend, 'principals/user1', $this->systemStatus); - return $node; + return $node; } - function testGetId() { - + public function testGetId() + { $node = $this->getInstance(); - $this->assertEquals($this->systemStatus->getId() . '.xml', $node->getName()); - + $this->assertEquals($this->systemStatus->getId().'.xml', $node->getName()); } - function testGetEtag() { - + public function testGetEtag() + { $node = $this->getInstance(); $this->assertEquals('"1"', $node->getETag()); - } - function testGetNotificationType() { - + public function testGetNotificationType() + { $node = $this->getInstance(); $this->assertEquals($this->systemStatus, $node->getNotificationType()); - } - function testDelete() { - + public function testDelete() + { $node = $this->getInstance(); $node->delete(); $this->assertEquals([], $this->caldavBackend->getNotificationsForPrincipal('principals/user1')); - } - function testGetGroup() { - + public function testGetGroup() + { $node = $this->getInstance(); $this->assertNull($node->getGroup()); - } - function testGetACL() { - + public function testGetACL() + { $node = $this->getInstance(); $expected = [ [ @@ -74,23 +71,20 @@ class NodeTest extends \PHPUnit_Framework_TestCase { ]; $this->assertEquals($expected, $node->getACL()); - } /** * @expectedException \Sabre\DAV\Exception\Forbidden */ - function testSetACL() { - + public function testSetACL() + { $node = $this->getInstance(); $node->setACL([]); - } - function testGetSupportedPrivilegeSet() { - + public function testGetSupportedPrivilegeSet() + { $node = $this->getInstance(); $this->assertNull($node->getSupportedPrivilegeSet()); - } } |