summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2016-11-23 17:43:57 +0000
committerLukas Reschke <lukas@statuscode.ch>2016-12-22 12:49:57 +0100
commite76732c03aee9e63da245044a16c5cfe1b0cba20 (patch)
tree901e12c82a892ee10e4a8d163407a7aee4588dc0 /build
parent02de82df91910ad8f206f379a5eeaee9fb332b74 (diff)
downloadnextcloud-server-e76732c03aee9e63da245044a16c5cfe1b0cba20.tar.gz
nextcloud-server-e76732c03aee9e63da245044a16c5cfe1b0cba20.zip
Added flexibility to properties
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/WebDav.php33
1 files changed, 13 insertions, 20 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 9cb9d4a3048..57ca638ec7f 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -406,32 +406,22 @@ trait WebDav {
return $response;
}
- /*Returns the elements of a report command*/
- public function reportFolder($user, $path, $properties = null){
+ /* Returns the elements of a report command
+ * @param string $user
+ * @param string $path
+ * @param string $properties properties which needs to be included in the report
+ * @param string $filterRules filter-rules to choose what needs to appear in the report
+ */
+ public function reportFolder($user, $path, $properties, $filterRules){
$client = $this->getSabreClient($user);
$body = '<?xml version="1.0" encoding="utf-8" ?>
<oc:filter-files xmlns:a="DAV:" xmlns:oc="http://owncloud.org/ns" >
<a:prop>
- <oc:id/>
- <oc:fileid/>
- <oc:permissions/>
- <a:getlastmodified/>
- <a:getetag/>
- <oc:downloadURL/>
- <oc:ddC/>
- <oc:size/>
- <oc:owner-id/>
- <oc:owner-display-name/>
- <oc:size/>
- <oc:checksum />
- <oc:tags />
- <a:quota-used-bytes/>
- <a:quota-available-bytes/>
- <oc:favorite/>
+ ' . $properties . '
</a:prop>
<oc:filter-rules>
- <oc:favorite>1</oc:favorite>
+ ' . $filterRules . '
</oc:filter-rules>
</oc:filter-files>';
@@ -722,7 +712,10 @@ trait WebDav {
* @param \Behat\Gherkin\Node\TableNode|null $expectedElements
*/
public function checkFavoritedElements($user, $folder, $expectedElements){
- $elementList = $this->reportFolder($user, $folder);
+ $elementList = $this->reportFolder($user,
+ $folder,
+ '<oc:favorite/>',
+ '<oc:favorite>1</oc:favorite>');
if ($expectedElements instanceof \Behat\Gherkin\Node\TableNode) {
$elementRows = $expectedElements->getRows();
$elementsSimplified = $this->simplifyArray($elementRows);