"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.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.

FreeBusyRequestTest.php  (dav-4.0.2):FreeBusyRequestTest.php  (dav-4.0.3)
skipping to change at line 301 skipping to change at line 301
$strings = [ $strings = [
'<d:href>mailto:user2.sabredav@sabredav.org</d:href>', '<d:href>mailto:user2.sabredav@sabredav.org</d:href>',
'<d:href>mailto:user3.sabredav@sabredav.org</d:href>', '<d:href>mailto:user3.sabredav@sabredav.org</d:href>',
'<cal:request-status>2.0;Success</cal:request-status>', '<cal:request-status>2.0;Success</cal:request-status>',
'<cal:request-status>3.7;Could not find principal</cal:request-statu s>', '<cal:request-status>3.7;Could not find principal</cal:request-statu s>',
'FREEBUSY:20110101T120000Z/20110101T130000Z', 'FREEBUSY:20110101T120000Z/20110101T130000Z',
]; ];
foreach ($strings as $string) { foreach ($strings as $string) {
$this->assertTrue( $this->assertTrue(
false !== strpos($this->response->body, $string), false !== strpos($this->response->getBodyAsString(), $string),
'The response body did not contain: '.$string.'Full response: '. 'The response body did not contain: '.$string.'Full response: '.
$this->response->body $this->response->getBodyAsString()
); );
} }
$this->assertTrue( $this->assertTrue(
false == strpos($this->response->body, 'FREEBUSY;FBTYPE=BUSY:2011010 1T080000Z/20110101T090000Z'), false == strpos($this->response->getBodyAsString(), 'FREEBUSY;FBTYPE =BUSY:20110101T080000Z/20110101T090000Z'),
'The response body did contain free busy info from a transparent cal endar.' 'The response body did contain free busy info from a transparent cal endar.'
); );
} }
/** /**
* Testing if the freebusy request still works, even if there are no * Testing if the freebusy request still works, even if there are no
* calendars in the target users' account. * calendars in the target users' account.
*/ */
public function testSucceedNoCalendars() public function testSucceedNoCalendars()
{ {
skipping to change at line 361 skipping to change at line 361
'Content-Type' => ['application/xml'], 'Content-Type' => ['application/xml'],
], $this->response->getHeaders()); ], $this->response->getHeaders());
$strings = [ $strings = [
'<d:href>mailto:user2.sabredav@sabredav.org</d:href>', '<d:href>mailto:user2.sabredav@sabredav.org</d:href>',
'<cal:request-status>2.0;Success</cal:request-status>', '<cal:request-status>2.0;Success</cal:request-status>',
]; ];
foreach ($strings as $string) { foreach ($strings as $string) {
$this->assertTrue( $this->assertTrue(
false !== strpos($this->response->body, $string), false !== strpos($this->response->getBodyAsString(), $string),
'The response body did not contain: '.$string.'Full response: '. 'The response body did not contain: '.$string.'Full response: '.
$this->response->body $this->response->getBodyAsString()
); );
} }
} }
public function testNoCalendarHomeFound() public function testNoCalendarHomeFound()
{ {
$this->server->httpRequest = new HTTP\Request( $this->server->httpRequest = new HTTP\Request(
'POST', 'POST',
'/calendars/user1/outbox', '/calendars/user1/outbox',
['Content-Type' => 'text/calendar'] ['Content-Type' => 'text/calendar']
skipping to change at line 413 skipping to change at line 413
'Content-Type' => ['application/xml'], 'Content-Type' => ['application/xml'],
], $this->response->getHeaders()); ], $this->response->getHeaders());
$strings = [ $strings = [
'<d:href>mailto:user2.sabredav@sabredav.org</d:href>', '<d:href>mailto:user2.sabredav@sabredav.org</d:href>',
'<cal:request-status>3.7;No calendar-home-set property found</cal:re quest-status>', '<cal:request-status>3.7;No calendar-home-set property found</cal:re quest-status>',
]; ];
foreach ($strings as $string) { foreach ($strings as $string) {
$this->assertTrue( $this->assertTrue(
false !== strpos($this->response->body, $string), false !== strpos($this->response->getBodyAsString(), $string),
'The response body did not contain: '.$string.'Full response: '. 'The response body did not contain: '.$string.'Full response: '.
$this->response->body $this->response->getBodyAsString()
); );
} }
} }
public function testNoInboxFound() public function testNoInboxFound()
{ {
$this->server->httpRequest = new HTTP\Request( $this->server->httpRequest = new HTTP\Request(
'POST', 'POST',
'/calendars/user1/outbox', '/calendars/user1/outbox',
['Content-Type' => 'text/calendar'] ['Content-Type' => 'text/calendar']
skipping to change at line 465 skipping to change at line 465
'Content-Type' => ['application/xml'], 'Content-Type' => ['application/xml'],
], $this->response->getHeaders()); ], $this->response->getHeaders());
$strings = [ $strings = [
'<d:href>mailto:user2.sabredav@sabredav.org</d:href>', '<d:href>mailto:user2.sabredav@sabredav.org</d:href>',
'<cal:request-status>3.7;No schedule-inbox-URL property found</cal:r equest-status>', '<cal:request-status>3.7;No schedule-inbox-URL property found</cal:r equest-status>',
]; ];
foreach ($strings as $string) { foreach ($strings as $string) {
$this->assertTrue( $this->assertTrue(
false !== strpos($this->response->body, $string), false !== strpos($this->response->getBodyAsString(), $string),
'The response body did not contain: '.$string.'Full response: '. 'The response body did not contain: '.$string.'Full response: '.
$this->response->body $this->response->getBodyAsString()
); );
} }
} }
public function testSucceedUseVAVAILABILITY() public function testSucceedUseVAVAILABILITY()
{ {
$this->server->httpRequest = new HTTP\Request( $this->server->httpRequest = new HTTP\Request(
'POST', 'POST',
'/calendars/user1/outbox', '/calendars/user1/outbox',
['Content-Type' => 'text/calendar'] ['Content-Type' => 'text/calendar']
skipping to change at line 535 skipping to change at line 535
$strings = [ $strings = [
'<d:href>mailto:user2.sabredav@sabredav.org</d:href>', '<d:href>mailto:user2.sabredav@sabredav.org</d:href>',
'<cal:request-status>2.0;Success</cal:request-status>', '<cal:request-status>2.0;Success</cal:request-status>',
'FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T080000Z/20110101T090000Z' , 'FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T080000Z/20110101T090000Z' ,
'FREEBUSY:20110101T120000Z/20110101T130000Z', 'FREEBUSY:20110101T120000Z/20110101T130000Z',
'FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T170000Z/20110101T180000Z' , 'FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T170000Z/20110101T180000Z' ,
]; ];
foreach ($strings as $string) { foreach ($strings as $string) {
$this->assertTrue( $this->assertTrue(
false !== strpos($this->response->body, $string), false !== strpos($this->response->getBodyAsString(), $string),
'The response body did not contain: '.$string.'Full response: '. 'The response body did not contain: '.$string.'Full response: '.
$this->response->body $this->response->getBodyAsString()
); );
} }
} }
} }
 End of changes. 6 change blocks. 
16 lines changed or deleted 16 lines changed or added

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