aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php
index efc49673f..3a982fcfa 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php
@@ -1,28 +1,30 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV;
use Sabre\HTTP;
use Sabre\VObject;
/**
- * This unittests is created to find out why recurring events have wrong DTSTART value
+ * This unittests is created to find out why recurring events have wrong DTSTART value.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class ExpandEventsDTSTARTandDTENDbyDayTest extends \Sabre\DAVServerTest {
-
+class ExpandEventsDTSTARTandDTENDbyDayTest extends \Sabre\DAVServerTest
+{
protected $setupCalDAV = true;
protected $caldavCalendars = [
[
- 'id' => 1,
- 'name' => 'Calendar',
+ 'id' => 1,
+ 'name' => 'Calendar',
'principaluri' => 'principals/user1',
- 'uri' => 'calendar1',
- ]
+ 'uri' => 'calendar1',
+ ],
];
protected $caldavCalendarObjects = [
@@ -43,13 +45,13 @@ END:VCALENDAR
],
];
- function testExpandRecurringByDayEvent() {
-
+ public function testExpandRecurringByDayEvent()
+ {
$request = HTTP\Sapi::createFromServerArray([
- 'REQUEST_METHOD' => 'REPORT',
+ 'REQUEST_METHOD' => 'REPORT',
'HTTP_CONTENT_TYPE' => 'application/xml',
- 'REQUEST_URI' => '/calendars/user1/calendar1',
- 'HTTP_DEPTH' => '1',
+ 'REQUEST_URI' => '/calendars/user1/calendar1',
+ 'HTTP_DEPTH' => '1',
]);
$request->setBody('<?xml version="1.0" encoding="utf-8" ?>
@@ -88,15 +90,14 @@ END:VCALENDAR
/** @var $vevent Sabre\VObject\Component\VEvent */
foreach ($vevent->children() as $child) {
/** @var $child Sabre\VObject\Property */
- if ($child->name == 'DTSTART') {
+ if ('DTSTART' == $child->name) {
// DTSTART has to be one of two valid values
- $this->assertContains($child->getValue(), ['20120214T171500Z', '20120216T171500Z'], 'DTSTART is not a valid value: ' . $child->getValue());
- } elseif ($child->name == 'DTEND') {
+ $this->assertContains($child->getValue(), ['20120214T171500Z', '20120216T171500Z'], 'DTSTART is not a valid value: '.$child->getValue());
+ } elseif ('DTEND' == $child->name) {
// DTEND has to be one of two valid values
- $this->assertContains($child->getValue(), ['20120214T181500Z', '20120216T181500Z'], 'DTEND is not a valid value: ' . $child->getValue());
+ $this->assertContains($child->getValue(), ['20120214T181500Z', '20120216T181500Z'], 'DTEND is not a valid value: '.$child->getValue());
}
}
}
}
-
}