From 8a8df607c1fc9382d60e6309f99cbe875316d769 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 28 Feb 2017 09:30:27 +0100 Subject: [PATCH 1/3] [3rdparty] Bump sabre/dav to 3.2.2 Signed-off-by: Roeland Jago Douma --- 3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty b/3rdparty index 98fa92c67d735..48420b6fd7012 160000 --- a/3rdparty +++ b/3rdparty @@ -1 +1 @@ -Subproject commit 98fa92c67d735f82ae012786395e660f1513bef7 +Subproject commit 48420b6fd7012d23550e2c43541b4b4ad0a85aa5 From 5c2772fb36e7ccd088d91c0459113840f37f2a47 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 28 Feb 2017 10:36:42 +0100 Subject: [PATCH 2/3] Fix tests Signed-off-by: Roeland Jago Douma --- apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php index cecf07ef1d8f5..72b3c57bea6cc 100644 --- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php @@ -126,9 +126,9 @@ public function testOnCardChanged($expectedOp) { if ($expectedOp === 'create') { $service->expects($this->exactly(3))->method('buildDateFromContact')->willReturn(new VCalendar()); $this->calDav->expects($this->exactly(3))->method('createCalendarObject')->withConsecutive( - [1234, 'default-gump.vcf.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"], - [1234, 'default-gump.vcf-death.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"], - [1234, 'default-gump.vcf-anniversary.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"] + [1234, 'default-gump.vcf.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.2//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"], + [1234, 'default-gump.vcf-death.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.2//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"], + [1234, 'default-gump.vcf-anniversary.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.2//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"] ); } if ($expectedOp === 'update') { @@ -136,9 +136,9 @@ public function testOnCardChanged($expectedOp) { $service->expects($this->exactly(3))->method('birthdayEvenChanged')->willReturn(true); $this->calDav->expects($this->exactly(3))->method('getCalendarObject')->willReturn(['calendardata' => '']); $this->calDav->expects($this->exactly(3))->method('updateCalendarObject')->withConsecutive( - [1234, 'default-gump.vcf.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"], - [1234, 'default-gump.vcf-death.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"], - [1234, 'default-gump.vcf-anniversary.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.1//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"] + [1234, 'default-gump.vcf.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.2//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"], + [1234, 'default-gump.vcf-death.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.2//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"], + [1234, 'default-gump.vcf-anniversary.ics', "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.2//EN\r\nCALSCALE:GREGORIAN\r\nEND:VCALENDAR\r\n"] ); } From e8ac348f4771ebaf53351aa29fb49113d7ddf614 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 28 Feb 2017 20:18:31 +0100 Subject: [PATCH 3/3] Make intergration tests work again The regex was to greedy Signed-off-by: Roeland Jago Douma --- build/integration/features/bootstrap/TagsContext.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/integration/features/bootstrap/TagsContext.php b/build/integration/features/bootstrap/TagsContext.php index 3a48cce8aea10..24ee8863e295d 100644 --- a/build/integration/features/bootstrap/TagsContext.php +++ b/build/integration/features/bootstrap/TagsContext.php @@ -511,7 +511,7 @@ private function getFileIdForPath($path, $user) { ) )); $response = file_get_contents($url, false, $context); - preg_match_all('/\(.*)\<\/oc:fileid\>/', $response, $matches); + preg_match_all('/\(.*?)\<\/oc:fileid\>/', $response, $matches); return (int)$matches[1][0]; } @@ -576,7 +576,7 @@ public function sharedByHasTheFollowingTags($fileName, $sharedOrOwnedBy, $sharin ] ); $response = $this->client->send($request)->getBody()->getContents(); - preg_match_all('/\(.*)\<\/oc:display-name\>/', $response, $realTags); + preg_match_all('/\(.*?)\<\/oc:display-name\>/', $response, $realTags); foreach($expectedTags as $key => $row) { foreach($realTags as $tag) { @@ -631,7 +631,7 @@ public function sharedByHasTheFollowingTagsFor($fileName, $sharingUser, $user, T } catch (\GuzzleHttp\Exception\ClientException $e) { $this->response = $e->getResponse(); } - preg_match_all('/\(.*)\<\/oc:display-name\>/', $this->response, $realTags); + preg_match_all('/\(.*?)\<\/oc:display-name\>/', $this->response, $realTags); $realTags = array_filter($realTags); $expectedTags = array_filter($expectedTags);