Skip to content

Commit

Permalink
Make intergration tests work again
Browse files Browse the repository at this point in the history
The regex was to greedy

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Mar 10, 2017
1 parent 5c2772f commit e8ac348
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/integration/features/bootstrap/TagsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ private function getFileIdForPath($path, $user) {
)
));
$response = file_get_contents($url, false, $context);
preg_match_all('/\<oc:fileid\>(.*)\<\/oc:fileid\>/', $response, $matches);
preg_match_all('/\<oc:fileid\>(.*?)\<\/oc:fileid\>/', $response, $matches);
return (int)$matches[1][0];
}

Expand Down Expand Up @@ -576,7 +576,7 @@ public function sharedByHasTheFollowingTags($fileName, $sharedOrOwnedBy, $sharin
]
);
$response = $this->client->send($request)->getBody()->getContents();
preg_match_all('/\<oc:display-name\>(.*)\<\/oc:display-name\>/', $response, $realTags);
preg_match_all('/\<oc:display-name\>(.*?)\<\/oc:display-name\>/', $response, $realTags);

foreach($expectedTags as $key => $row) {
foreach($realTags as $tag) {
Expand Down Expand Up @@ -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\>(.*)\<\/oc:display-name\>/', $this->response, $realTags);
preg_match_all('/\<oc:display-name\>(.*?)\<\/oc:display-name\>/', $this->response, $realTags);
$realTags = array_filter($realTags);
$expectedTags = array_filter($expectedTags);

Expand Down

0 comments on commit e8ac348

Please sign in to comment.