"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/sabre/vobject/tests/VObject/Component/VCalendarTest.php" between
sabredav-3.1.2.zip and sabredav-3.1.3.zip

About: SabreDAV allows you to easily add WebDAV support to a PHP application.

VCalendarTest.php  (sabredav-3.1.2):VCalendarTest.php  (sabredav-3.1.3)
<?php <?php
namespace Sabre\VObject\Component; namespace Sabre\VObject\Component;
use DateTimeZone; use DateTimeZone;
use Sabre\VObject; use Sabre\VObject;
class VCalendarTest extends VObject\TestCase { class VCalendarTest extends \PHPUnit_Framework_TestCase {
use VObject\PHPUnitAssertions;
/** /**
* @dataProvider expandData * @dataProvider expandData
*/ */
function testExpand($input, $output, $timeZone = 'UTC', $start = '2011-12-01 ', $end = '2011-12-31') { function testExpand($input, $output, $timeZone = 'UTC', $start = '2011-12-01 ', $end = '2011-12-31') {
$vcal = VObject\Reader::read($input); $vcal = VObject\Reader::read($input);
$timeZone = new DateTimeZone($timeZone); $timeZone = new DateTimeZone($timeZone);
$vcal = $vcal->expand( $vcal = $vcal->expand(
new \DateTime($start), new \DateTime($start),
new \DateTime($end), new \DateTime($end),
$timeZone $timeZone
); );
// This will normalize the output // This will normalize the output
$output = VObject\Reader::read($output)->serialize(); $output = VObject\Reader::read($output)->serialize();
$this->assertVObjEquals($output, $vcal->serialize()); $this->assertVObjectEqualsVObject($output, $vcal->serialize());
} }
function expandData() { function expandData() {
$tests = []; $tests = [];
// No data // No data
$input = 'BEGIN:VCALENDAR $input = 'BEGIN:VCALENDAR
CALSCALE:GREGORIAN CALSCALE:GREGORIAN
skipping to change at line 293 skipping to change at line 295
UID:bla1 UID:bla1
DTSTART:20141112T225000Z DTSTART:20141112T225000Z
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
UID:bla2 UID:bla2
DTSTART;VALUE=DATE:20141112 DTSTART;VALUE=DATE:20141112
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
UID:bla3 UID:bla3
DTSTART;VALUE=DATE:20141112 DTSTART;VALUE=DATE:20141112
RECURRENCE-ID;VALUE=DATE:20141112
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
UID:bla3 UID:bla3
DTSTART;VALUE=DATE:20141113 DTSTART;VALUE=DATE:20141113
RECURRENCE-ID;VALUE=DATE:20141113 RECURRENCE-ID;VALUE=DATE:20141113
END:VEVENT END:VEVENT
END:VCALENDAR END:VCALENDAR
ICS; ICS;
$tests[] = [$input, $output, 'America/Argentina/Buenos_Aires', '2014-01- 01', '2015-01-01']; $tests[] = [$input, $output, 'America/Argentina/Buenos_Aires', '2014-01- 01', '2015-01-01'];
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS