aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/CommentsContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/features/bootstrap/CommentsContext.php')
-rw-r--r--build/integration/features/bootstrap/CommentsContext.php41
1 files changed, 10 insertions, 31 deletions
diff --git a/build/integration/features/bootstrap/CommentsContext.php b/build/integration/features/bootstrap/CommentsContext.php
index 0eddf972bc1..53001b1c204 100644
--- a/build/integration/features/bootstrap/CommentsContext.php
+++ b/build/integration/features/bootstrap/CommentsContext.php
@@ -1,28 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Julius Härtl <jus@bitgrid.net>
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
require __DIR__ . '/../../vendor/autoload.php';
@@ -49,8 +30,6 @@ class CommentsContext implements \Behat\Behat\Context\Context {
}
}
-
-
/**
* get a named entry from response instead of picking a random entry from values
*
@@ -158,7 +137,7 @@ class CommentsContext implements \Behat\Behat\Context\Context {
}
if ($res->getStatusCode() !== (int)$statusCode) {
- throw new \Exception("Response status code was not $statusCode (" . $res->getStatusCode() . ")");
+ throw new \Exception("Response status code was not $statusCode (" . $res->getStatusCode() . ')');
}
}
@@ -200,13 +179,13 @@ class CommentsContext implements \Behat\Behat\Context\Context {
}
if ($res->getStatusCode() !== (int)$statusCode) {
- throw new \Exception("Response status code was not $statusCode (" . $res->getStatusCode() . ")");
+ throw new \Exception("Response status code was not $statusCode (" . $res->getStatusCode() . ')');
}
if ($res->getStatusCode() === 207) {
$service = new Sabre\Xml\Service();
$this->response = $service->parse($res->getBody()->getContents());
- $this->commentId = (int) ($this->getValueFromNamedEntries('{DAV:}response {DAV:}propstat {DAV:}prop {http://owncloud.org/ns}id', $this->response ?? []) ?? 0);
+ $this->commentId = (int)($this->getValueFromNamedEntries('{DAV:}response {DAV:}propstat {DAV:}prop {http://owncloud.org/ns}id', $this->response ?? []) ?? 0);
}
}
@@ -258,7 +237,7 @@ class CommentsContext implements \Behat\Behat\Context\Context {
}
if ($res->getStatusCode() !== (int)$statusCode) {
- throw new \Exception("Response status code was not $statusCode (" . $res->getStatusCode() . ")");
+ throw new \Exception("Response status code was not $statusCode (" . $res->getStatusCode() . ')');
}
}
@@ -295,7 +274,7 @@ class CommentsContext implements \Behat\Behat\Context\Context {
$count = count($this->response);
}
if ($count !== (int)$number) {
- throw new \Exception("Found more comments than $number (" . $count . ")");
+ throw new \Exception("Found more comments than $number (" . $count . ')');
}
}
@@ -325,7 +304,7 @@ class CommentsContext implements \Behat\Behat\Context\Context {
}
if ($res->getStatusCode() !== (int)$statusCode) {
- throw new \Exception("Response status code was not $statusCode (" . $res->getStatusCode() . ")");
+ throw new \Exception("Response status code was not $statusCode (" . $res->getStatusCode() . ')');
}
}
}