]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add messages to assertFalse/True to clarify the failed assertion
authorDaniel Calviño Sánchez <danxuliu@gmail.com>
Wed, 12 Jun 2019 13:32:40 +0000 (15:32 +0200)
committerDaniel Calviño Sánchez <danxuliu@gmail.com>
Wed, 12 Jun 2019 13:32:40 +0000 (15:32 +0200)
Otherwise the output would just read "Failed asserting that true is
false." or "Failed asserting that false is true.", which is not very
informative when there are several assertFalse/True in a row.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
tests/acceptance/features/bootstrap/PublicShareContext.php

index 025083303913040f989756c440f0a050bb7864f7..891c231b1648f253bfaaca0b8a25aec5748d89d4 100644 (file)
@@ -202,11 +202,14 @@ class PublicShareContext implements Context, ActorAwareInterface {
                // download item should not be shown in the menu (although it will be in
                // the DOM).
                PHPUnit_Framework_Assert::assertFalse(
-                               $this->actor->find(self::downloadItemInShareMenu())->isVisible());
+                               $this->actor->find(self::downloadItemInShareMenu())->isVisible(),
+                               "Download item in share menu is visible");
                PHPUnit_Framework_Assert::assertTrue(
-                               $this->actor->find(self::directLinkItemInShareMenu())->isVisible());
+                               $this->actor->find(self::directLinkItemInShareMenu())->isVisible(),
+                               "Direct link item in share menu is not visible");
                PHPUnit_Framework_Assert::assertTrue(
-                               $this->actor->find(self::saveItemInShareMenu())->isVisible());
+                               $this->actor->find(self::saveItemInShareMenu())->isVisible(),
+                               "Save item in share menu is not visible");
        }
 
        /**