"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/Sabre/CalDAV/ICSExportPluginTest.php" between
dav-4.0.2.tar.gz and dav-4.0.3.tar.gz

About: sabre/dav is a WebDAV framework for PHP allowing to create WebDAV, CalDAV and CardDAV servers.

ICSExportPluginTest.php  (dav-4.0.2):ICSExportPluginTest.php  (dav-4.0.3)
skipping to change at line 85 skipping to change at line 85
$request = new HTTP\Request( $request = new HTTP\Request(
'GET', 'GET',
'/calendars/admin/UUID-123467?export' '/calendars/admin/UUID-123467?export'
); );
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(200, $response->getStatus()); $this->assertEquals(200, $response->getStatus());
$this->assertEquals('text/calendar', $response->getHeader('Content-Type' )); $this->assertEquals('text/calendar', $response->getHeader('Content-Type' ));
$obj = VObject\Reader::read($response->body); $obj = VObject\Reader::read($response->getBodyAsString());
$this->assertEquals(8, count($obj->children())); $this->assertEquals(8, count($obj->children()));
$this->assertEquals(1, count($obj->VERSION)); $this->assertEquals(1, count($obj->VERSION));
$this->assertEquals(1, count($obj->CALSCALE)); $this->assertEquals(1, count($obj->CALSCALE));
$this->assertEquals(1, count($obj->PRODID)); $this->assertEquals(1, count($obj->PRODID));
$this->assertTrue(false !== strpos((string) $obj->PRODID, DAV\Version::V ERSION)); $this->assertTrue(false !== strpos((string) $obj->PRODID, DAV\Version::V ERSION));
$this->assertEquals(1, count($obj->VTIMEZONE)); $this->assertEquals(1, count($obj->VTIMEZONE));
$this->assertEquals(1, count($obj->VEVENT)); $this->assertEquals(1, count($obj->VEVENT));
$this->assertEquals('Hello!', $obj->{'X-WR-CALNAME'}); $this->assertEquals('Hello!', $obj->{'X-WR-CALNAME'});
$this->assertEquals('#AA0000FF', $obj->{'X-APPLE-CALENDAR-COLOR'}); $this->assertEquals('#AA0000FF', $obj->{'X-APPLE-CALENDAR-COLOR'});
skipping to change at line 111 skipping to change at line 111
'GET', 'GET',
'/calendars/admin/UUID-123467?export' '/calendars/admin/UUID-123467?export'
); );
DAV\Server::$exposeVersion = false; DAV\Server::$exposeVersion = false;
$response = $this->request($request); $response = $this->request($request);
DAV\Server::$exposeVersion = true; DAV\Server::$exposeVersion = true;
$this->assertEquals(200, $response->getStatus()); $this->assertEquals(200, $response->getStatus());
$this->assertEquals('text/calendar', $response->getHeader('Content-Type' )); $this->assertEquals('text/calendar', $response->getHeader('Content-Type' ));
$obj = VObject\Reader::read($response->body); $obj = VObject\Reader::read($response->getBodyAsString());
$this->assertEquals(8, count($obj->children())); $this->assertEquals(8, count($obj->children()));
$this->assertEquals(1, count($obj->VERSION)); $this->assertEquals(1, count($obj->VERSION));
$this->assertEquals(1, count($obj->CALSCALE)); $this->assertEquals(1, count($obj->CALSCALE));
$this->assertEquals(1, count($obj->PRODID)); $this->assertEquals(1, count($obj->PRODID));
$this->assertFalse(false !== strpos((string) $obj->PRODID, DAV\Version:: VERSION)); $this->assertFalse(false !== strpos((string) $obj->PRODID, DAV\Version:: VERSION));
$this->assertEquals(1, count($obj->VTIMEZONE)); $this->assertEquals(1, count($obj->VTIMEZONE));
$this->assertEquals(1, count($obj->VEVENT)); $this->assertEquals(1, count($obj->VEVENT));
} }
skipping to change at line 169 skipping to change at line 169
$this->autoLogin('admin'); $this->autoLogin('admin');
$request = new HTTP\Request( $request = new HTTP\Request(
'GET', 'GET',
'/calendars/admin/UUID-123467?export' '/calendars/admin/UUID-123467?export'
); );
$response = $this->request($request, 200); $response = $this->request($request, 200);
$this->assertEquals('text/calendar', $response->getHeader('Content-Type' )); $this->assertEquals('text/calendar', $response->getHeader('Content-Type' ));
$obj = VObject\Reader::read($response->body); $obj = VObject\Reader::read($response->getBodyAsString());
$this->assertEquals(8, count($obj->children())); $this->assertEquals(8, count($obj->children()));
$this->assertEquals(1, count($obj->VERSION)); $this->assertEquals(1, count($obj->VERSION));
$this->assertEquals(1, count($obj->CALSCALE)); $this->assertEquals(1, count($obj->CALSCALE));
$this->assertEquals(1, count($obj->PRODID)); $this->assertEquals(1, count($obj->PRODID));
$this->assertTrue(false !== strpos((string) $obj->PRODID, DAV\Version::V ERSION)); $this->assertTrue(false !== strpos((string) $obj->PRODID, DAV\Version::V ERSION));
$this->assertEquals(1, count($obj->VTIMEZONE)); $this->assertEquals(1, count($obj->VTIMEZONE));
$this->assertEquals(1, count($obj->VEVENT)); $this->assertEquals(1, count($obj->VEVENT));
} }
skipping to change at line 279 skipping to change at line 279
public function testFilterComponentVEVENT() public function testFilterComponentVEVENT()
{ {
$request = new HTTP\Request( $request = new HTTP\Request(
'GET', 'GET',
'/calendars/admin/UUID-123467?export&componentType=VEVENT' '/calendars/admin/UUID-123467?export&componentType=VEVENT'
); );
$response = $this->request($request, 200); $response = $this->request($request, 200);
$obj = VObject\Reader::read($response->body); $obj = VObject\Reader::read($response->getBodyAsString());
$this->assertEquals(1, count($obj->VTIMEZONE)); $this->assertEquals(1, count($obj->VTIMEZONE));
$this->assertEquals(1, count($obj->VEVENT)); $this->assertEquals(1, count($obj->VEVENT));
$this->assertNull($obj->VTODO); $this->assertNull($obj->VTODO);
} }
public function testFilterComponentVTODO() public function testFilterComponentVTODO()
{ {
$request = new HTTP\Request( $request = new HTTP\Request(
'GET', 'GET',
'/calendars/admin/UUID-123467?export&componentType=VTODO' '/calendars/admin/UUID-123467?export&componentType=VTODO'
); );
$response = $this->request($request, 200); $response = $this->request($request, 200);
$obj = VObject\Reader::read($response->body); $obj = VObject\Reader::read($response->getBodyAsString());
$this->assertNull($obj->VTIMEZONE); $this->assertNull($obj->VTIMEZONE);
$this->assertNull($obj->VEVENT); $this->assertNull($obj->VEVENT);
$this->assertEquals(1, count($obj->VTODO)); $this->assertEquals(1, count($obj->VTODO));
} }
public function testFilterComponentBadComponent() public function testFilterComponentBadComponent()
{ {
$request = new HTTP\Request( $request = new HTTP\Request(
'GET', 'GET',
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)