From e65fd1141909608862f95c582ac98ab2b07f632b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Wed, 12 Jun 2019 15:32:40 +0200 Subject: [PATCH] Add messages to assertFalse/True to clarify the failed assertion MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- .../acceptance/features/bootstrap/PublicShareContext.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/features/bootstrap/PublicShareContext.php b/tests/acceptance/features/bootstrap/PublicShareContext.php index 02508330391..891c231b164 100644 --- a/tests/acceptance/features/bootstrap/PublicShareContext.php +++ b/tests/acceptance/features/bootstrap/PublicShareContext.php @@ -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"); } /** -- 2.39.5