diff options
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php index ca06d8ffa..660832ba4 100644 --- a/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php +++ b/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php @@ -1,17 +1,19 @@ <?php +declare(strict_types=1); + namespace Sabre\CalDAV; use Sabre\VObject; -class CalendarQueryVAlarmTest extends \PHPUnit_Framework_TestCase { - +class CalendarQueryVAlarmTest extends \PHPUnit\Framework\TestCase +{ /** * This test is specifically for a time-range query on a VALARM, contained - * in a VEVENT that's recurring + * in a VEVENT that's recurring. */ - function testValarm() { - + public function testValarm() + { $vcalendar = new VObject\Component\VCalendar(); $vevent = $vcalendar->createComponent('VEVENT'); @@ -23,29 +25,28 @@ class CalendarQueryVAlarmTest extends \PHPUnit_Framework_TestCase { $valarm->TRIGGER = '-P15D'; $vevent->add($valarm); - $vcalendar->add($vevent); $filter = [ - 'name' => 'VCALENDAR', + 'name' => 'VCALENDAR', 'is-not-defined' => false, - 'time-range' => null, - 'prop-filters' => [], - 'comp-filters' => [ + 'time-range' => null, + 'prop-filters' => [], + 'comp-filters' => [ [ - 'name' => 'VEVENT', + 'name' => 'VEVENT', 'is-not-defined' => false, - 'time-range' => null, - 'prop-filters' => [], - 'comp-filters' => [ + 'time-range' => null, + 'prop-filters' => [], + 'comp-filters' => [ [ - 'name' => 'VALARM', + 'name' => 'VALARM', 'is-not-defined' => false, - 'prop-filters' => [], - 'comp-filters' => [], - 'time-range' => [ + 'prop-filters' => [], + 'comp-filters' => [], + 'time-range' => [ 'start' => new \DateTime('2012-05-10'), - 'end' => new \DateTime('2012-05-20'), + 'end' => new \DateTime('2012-05-20'), ], ], ], @@ -73,8 +74,8 @@ class CalendarQueryVAlarmTest extends \PHPUnit_Framework_TestCase { $this->assertFalse($validator->validate($vcalendar, $filter)); } - function testAlarmWayBefore() { - + public function testAlarmWayBefore() + { $vcalendar = new VObject\Component\VCalendar(); $vevent = $vcalendar->createComponent('VEVENT'); @@ -88,25 +89,25 @@ class CalendarQueryVAlarmTest extends \PHPUnit_Framework_TestCase { $vcalendar->add($vevent); $filter = [ - 'name' => 'VCALENDAR', + 'name' => 'VCALENDAR', 'is-not-defined' => false, - 'time-range' => null, - 'prop-filters' => [], - 'comp-filters' => [ + 'time-range' => null, + 'prop-filters' => [], + 'comp-filters' => [ [ - 'name' => 'VEVENT', + 'name' => 'VEVENT', 'is-not-defined' => false, - 'time-range' => null, - 'prop-filters' => [], - 'comp-filters' => [ + 'time-range' => null, + 'prop-filters' => [], + 'comp-filters' => [ [ - 'name' => 'VALARM', + 'name' => 'VALARM', 'is-not-defined' => false, - 'prop-filters' => [], - 'comp-filters' => [], - 'time-range' => [ + 'prop-filters' => [], + 'comp-filters' => [], + 'time-range' => [ 'start' => new \DateTime('2011-12-10'), - 'end' => new \DateTime('2011-12-20'), + 'end' => new \DateTime('2011-12-20'), ], ], ], @@ -116,7 +117,5 @@ class CalendarQueryVAlarmTest extends \PHPUnit_Framework_TestCase { $validator = new CalendarQueryValidator(); $this->assertTrue($validator->validate($vcalendar, $filter)); - } - } |