[TASK] Make FlashMessagesViewHelperTest notice free 26/56226/2
authorJan Helke <typo3@helke.de>
Fri, 16 Mar 2018 14:22:24 +0000 (15:22 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 16 Mar 2018 15:11:07 +0000 (16:11 +0100)
Releases: master
Resolves: #84346
Change-Id: Ie42bb8d7263ec0ca44b38ca6fb8d39aba5dcd43a
Reviewed-on: https://review.typo3.org/56226
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FlashMessagesViewHelperTest.php

index 0124581..a39b45b 100644 (file)
@@ -25,11 +25,6 @@ use TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 class FlashMessagesViewHelperTest extends ViewHelperBaseTestcase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\FlashMessagesViewHelper
      */
     protected $viewHelper;
@@ -57,6 +52,12 @@ class FlashMessagesViewHelperTest extends ViewHelperBaseTestcase
      */
     public function renderReturnsEmptyStringIfNoFlashMessagesAreInQueue()
     {
+        $this->setArgumentsUnderTest(
+            $this->viewHelper,
+            [
+                'as' => null
+            ]
+        );
         $this->flashMessageQueue->getAllMessagesAndFlush()->willReturn();
         $this->assertEmpty($this->viewHelper->initializeArgumentsAndRender());
     }