Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-12-02 10:53:02 +0300
committerGitHub <noreply@github.com>2019-12-02 10:53:02 +0300
commit407c2c13ab7d2322127198b7a2ab77990c7b2190 (patch)
tree18d9ca8449a86b30d2b2f781bd5c6991f544dd61 /build
parente98ae45b8311d8d10aba2ec46830de02694f7f88 (diff)
parent330cb7047e7160431bb6a3c6ec0c596d1ecd9b11 (diff)
Merge pull request #18159 from nextcloud/tests/comments-integration
Do not call count on null
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/CommentsContext.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/CommentsContext.php b/build/integration/features/bootstrap/CommentsContext.php
index ce05b56689d..262ffc92b88 100644
--- a/build/integration/features/bootstrap/CommentsContext.php
+++ b/build/integration/features/bootstrap/CommentsContext.php
@@ -256,8 +256,12 @@ class CommentsContext implements \Behat\Behat\Context\Context {
* @throws \Exception
*/
public function theResponseShouldContainOnlyComments($number) {
- if (count($this->response) !== (int)$number) {
- throw new \Exception("Found more comments than $number (" . count($this->response) . ")");
+ $count = 0;
+ if ($this->response !== null) {
+ $count = count($this->response);
+ }
+ if ($count !== (int)$number) {
+ throw new \Exception("Found more comments than $number (" . $count . ")");
}
}