Bläddra i källkod

Merge pull request #18159 from nextcloud/tests/comments-integration

Do not call count on null
tags/v18.0.0beta1
Roeland Jago Douma 4 år sedan
förälder
incheckning
407c2c13ab
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 6 tillägg och 2 borttagningar
  1. 6
    2
      build/integration/features/bootstrap/CommentsContext.php

+ 6
- 2
build/integration/features/bootstrap/CommentsContext.php Visa fil

@@ -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 . ")");
}
}


Laddar…
Avbryt
Spara