[!!!][TASK] Replace deprecated FlashMessage handling 12/28912/7
authorAlexander Schnitzler <typo3@alexanderschnitzler.de>
Thu, 27 Mar 2014 12:37:24 +0000 (13:37 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Tue, 16 Sep 2014 21:58:04 +0000 (23:58 +0200)
Before 6.2 there have been some changes regarding the flash message
handling. At first, the flash message queue object was a global static
storage for all flash messages. To be able to address flash messages,
the flash message service has been introduced which is official API to
handle all needed queues.

Using flash messages now requires the use of this flash message service.
The usage has already been removed/replaced in most parts of the core,
but there are some lefovers. Also extbase provided a special layer
for flash message handling which will also be removed completely.

Releases: master
Resolves: #57382
Change-Id: I3e3c9c23b5062ae740cae631bd3ee72362b78b33
Reviewed-on: http://review.typo3.org/28912
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/beuser/Classes/Controller/BackendUserController.php
typo3/sysext/core/Classes/Messaging/FlashMessageQueue.php
typo3/sysext/core/Classes/Resource/Service/UserStorageCapabilityService.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-57382-FlashMessageApi.rst [new file with mode: 0644]
typo3/sysext/core/Migrations/Code/LegacyClassesForIde.php
typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php
typo3/sysext/extbase/Classes/Mvc/Controller/ControllerContext.php
typo3/sysext/extbase/Classes/Mvc/Controller/FlashMessageContainer.php [deleted file]
typo3/sysext/extbase/Migrations/Code/ClassAliasMap.php
typo3/sysext/extbase/ext_typoscript_setup.txt
typo3/sysext/fluid/Tests/Unit/View/StandaloneViewTest.php

index 889200d..af3084e 100644 (file)
@@ -189,7 +189,7 @@ class BackendUserController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionCont
                );
                if ($GLOBALS['TYPO3_DB']->sql_affected_rows() == 1) {
                        $message = 'Session successfully terminated.';
-                       $this->flashMessageContainer->add($message, '', \TYPO3\CMS\Core\Messaging\FlashMessage::OK);
+                       $this->controllerContext->getFlashMessageQueue()->enqueue($message, '', \TYPO3\CMS\Core\Messaging\FlashMessage::OK);
                }
                $this->forward('online');
        }
index fd0da08..4b9ae2d 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Core\Messaging;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Core\Authentication\AbstractUserAuthentication;
+
 /**
  * A class which collects and renders flash messages.
  *
@@ -39,7 +41,8 @@ class FlashMessageQueue extends \SplQueue {
         * Adds a message either to the BE_USER session (if the $message has the storeInSession flag set)
         * or it enqueues the message.
         *
-        * @param \TYPO3\CMS\Core\Messaging\FlashMessage $message Instance of \TYPO3\CMS\Core\Messaging\FlashMessage, representing a message
+        * @param FlashMessage $message Instance of \TYPO3\CMS\Core\Messaging\FlashMessage, representing a message
+        * @throws \TYPO3\CMS\Core\Exception
         * @return void
         */
        public function enqueue($message) {
@@ -57,6 +60,14 @@ class FlashMessageQueue extends \SplQueue {
        }
 
        /**
+        * @param FlashMessage $message
+        * @return void
+        */
+       public function addMessage(FlashMessage $message) {
+               $this->enqueue($message);
+       }
+
+       /**
         * @return void
         */
        public function dequeue() {
@@ -67,10 +78,10 @@ class FlashMessageQueue extends \SplQueue {
         * Adds the given flash message to the array of
         * flash messages that will be stored in the session.
         *
-        * @param \TYPO3\CMS\Core\Messaging\FlashMessage $message
+        * @param FlashMessage $message
         * @return void
         */
-       protected function addFlashMessageToSession(\TYPO3\CMS\Core\Messaging\FlashMessage $message) {
+       protected function addFlashMessageToSession(FlashMessage $message) {
                $queuedFlashMessages = $this->getFlashMessagesFromSession();
                $queuedFlashMessages[] = $message;
                $this->storeFlashMessagesInSession($queuedFlashMessages);
@@ -79,9 +90,9 @@ class FlashMessageQueue extends \SplQueue {
        /**
         * Returns all messages from the current PHP session and from the current request.
         *
-        * @return array Array of \TYPO3\CMS\Core\Messaging\FlashMessage objects
+        * @return FlashMessage[]
         */
-       protected function getAllMessages() {
+       public function getAllMessages() {
                // Get messages from user session
                $queuedFlashMessagesFromSession = $this->getFlashMessagesFromSession();
                $queuedFlashMessages = array_merge($queuedFlashMessagesFromSession, $this->toArray());
@@ -93,9 +104,9 @@ class FlashMessageQueue extends \SplQueue {
         * After fetching the messages the internal queue and the message queue in the session
         * will be emptied.
         *
-        * @return array Array of \TYPO3\CMS\Core\Messaging\FlashMessage objects
+        * @return FlashMessage[]
         */
-       protected function getAllMessagesAndFlush() {
+       public function getAllMessagesAndFlush() {
                $queuedFlashMessages = $this->getAllMessages();
                // Reset messages in user session
                $this->removeAllFlashMessagesFromSession();
@@ -107,7 +118,7 @@ class FlashMessageQueue extends \SplQueue {
        /**
         * Stores given flash messages in the session
         *
-        * @param array $flashMessages Array of \TYPO3\CMS\Core\Messaging\FlashMessage
+        * @param FlashMessage[] $flashMessages
         * @return void
         */
        protected function storeFlashMessagesInSession(array $flashMessages) {
@@ -127,7 +138,7 @@ class FlashMessageQueue extends \SplQueue {
         * Returns current flash messages from the session, making sure to always
         * return an array.
         *
-        * @return array An array of \TYPO3\CMS\Core\Messaging\FlashMessage flash messages.
+        * @return FlashMessage[]
         */
        protected function getFlashMessagesFromSession() {
                $flashMessages = $this->getUserByContext()->getSessionData($this->identifier);
@@ -137,7 +148,7 @@ class FlashMessageQueue extends \SplQueue {
        /**
         * Gets user object by context
         *
-        * @return object User object
+        * @return AbstractUserAuthentication
         */
        protected function getUserByContext() {
                return TYPO3_MODE === 'BE' ? $GLOBALS['BE_USER'] : $GLOBALS['TSFE']->fe_user;
@@ -148,12 +159,11 @@ class FlashMessageQueue extends \SplQueue {
         *
         * @return string All flash messages in the queue rendered as HTML.
         */
-       protected function renderFlashMessages() {
+       public function renderFlashMessages() {
                $content = '';
                $flashMessages = $this->getAllMessagesAndFlush();
-               if (count($flashMessages)) {
+               if (!empty($flashMessages)) {
                        foreach ($flashMessages as $flashMessage) {
-                               /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */
                                $content .= $flashMessage->render();
                        }
                }
@@ -163,7 +173,7 @@ class FlashMessageQueue extends \SplQueue {
        /**
         * Returns all items of the queue as array
         *
-        * @return array
+        * @return FlashMessage[]
         */
        public function toArray() {
                $array = array();
@@ -186,79 +196,4 @@ class FlashMessageQueue extends \SplQueue {
                        parent::dequeue();
                }
        }
-
-       /**
-        * This method provides a fallback for deprecated static calls like:
-        * FlashMessageQueue::renderFlashMessages,
-        * FlashMessageQueue::getAllMessagesAndFlush,
-        * FlashMessageQueue::getAllMessages and
-        * FlashMessageQueue::addMessage
-        *
-        * From 6.3 on __callStatic and __call will be removed and the
-        * protected non static methods "renderFlashMessages",
-        * "getAllMessagesAndFlush", "getAllMessages" and "addMessage"
-        * will be made public.
-        *
-        * @param string $name
-        * @param array $arguments
-        * @throws \RuntimeException
-        * @return void|array|string
-        * @deprecated since 6.1 will be removed in 6.3
-        */
-       static public function __callStatic($name, array $arguments) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
-               /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-               $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
-               $identifier = 'core.template.flashMessages';
-               switch ($name) {
-                       case 'renderFlashMessages':
-                               return $flashMessageService->getMessageQueueByIdentifier($identifier)->renderFlashMessages();
-                               break;
-                       case 'getAllMessagesAndFlush':
-                               return $flashMessageService->getMessageQueueByIdentifier($identifier)->getAllMessagesAndFlush();
-                               break;
-                       case 'getAllMessages':
-                               return $flashMessageService->getMessageQueueByIdentifier($identifier)->getAllMessages();
-                               break;
-                       case 'addMessage':
-                               $flashMessageService->getMessageQueueByIdentifier($identifier)->enqueue(current($arguments));
-                               break;
-                       default:
-                               throw new \RuntimeException('The requested method "' . $name . '" cannot be called via __callStatic.', 1363300030);
-               }
-       }
-
-       /**
-        * This method is deprecated but will not log a deprecation
-        * message because once the here used method names are 'free'
-        * again they will be implemented natively in this class. This
-        * is not possible at the moment because these methods have
-        * been static and need to be statically callable through
-        * __callStatic until 6.3.
-        *
-        * @param string $name
-        * @param array $arguments
-        * @throws \RuntimeException
-        * @return void|array|string
-        * @see __callStatic
-        * @deprecated since 6.1 will be removed in 6.3
-        */
-       public function __call($name, array $arguments) {
-               switch ($name) {
-                       case 'renderFlashMessages':
-                               return $this->renderFlashMessages();
-                               break;
-                       case 'getAllMessagesAndFlush':
-                               return $this->getAllMessagesAndFlush();
-                               break;
-                       case 'getAllMessages':
-                               return $this->getAllMessages();
-                               break;
-                       case 'addMessage':
-                               $this->enqueue(current($arguments));
-                               break;
-                       default:
-                               throw new \RuntimeException('The requested method "' . $name . '" cannot be called via __call.', 1363300072);
-               }
-       }
 }
index b1f82b6..cc69d12 100644 (file)
@@ -50,7 +50,11 @@ class UserStorageCapabilityService {
                                        \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
                                );
 
-                               \TYPO3\CMS\Core\Messaging\FlashMessageQueue::addMessage($message);
+                               /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
+                               $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
+                               /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
+                               $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
+                               $defaultFlashMessageQueue->enqueue($message);
                        }
                }
 
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-57382-FlashMessageApi.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-57382-FlashMessageApi.rst
new file mode 100644 (file)
index 0000000..2c0c83a
--- /dev/null
@@ -0,0 +1,25 @@
+===============================================
+Breaking: #57382 - Remove old flash message API
+===============================================
+
+Description
+===========
+
+The old flash message API is removed.
+
+Impact
+======
+
+Extensions relying on the old (static) flash message queue API will not work anymore.
+Extbase removes the protected old flashMessageContainer.
+
+Affected installations
+======================
+
+Any installation that uses an extension relying on the old API.
+
+Migration
+=========
+
+Change the API calls to not be of static kind anymore.
+Extbase extensions have to use getFlashMessageQueue() of the controllerContext
\ No newline at end of file
index 97955f2..0040698 100644 (file)
@@ -1759,11 +1759,6 @@ class Tx_Extbase_MVC_Controller_Exception_RequiredArgumentMissingException exten
 /**
  * @deprecated since 6.0 will be removed in 7.0
  */
-class Tx_Extbase_MVC_Controller_FlashMessages extends \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer {}
-
-/**
- * @deprecated since 6.0 will be removed in 7.0
- */
 class Tx_Extbase_MVC_Controller_MvcPropertyMappingConfiguration extends \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration {}
 
 /**
index e303469..f998f7e 100644 (file)
@@ -105,12 +105,6 @@ abstract class AbstractController implements ControllerInterface {
        }
 
        /**
-        * @var \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer
-        * @api
-        */
-       protected $flashMessageContainer;
-
-       /**
         * @var ConfigurationManagerInterface
         */
        protected $configurationManager;
@@ -154,19 +148,6 @@ abstract class AbstractController implements ControllerInterface {
        }
 
        /**
-        * This method is deprecated! For further information have a look at
-        * the PhpDoc of class \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer
-        *
-        * @param \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer $flashMessageContainer
-        * @return void
-        *
-        * @deprecated since Extbase 6.1, will be removed 2 versions later
-        */
-       public function injectFlashMessageContainer(\TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer $flashMessageContainer) {
-               $this->flashMessageContainer = $flashMessageContainer;
-       }
-
-       /**
         * Creates a Message object and adds it to the FlashMessageQueue.
         *
         * @param string $messageBody The message
@@ -251,7 +232,6 @@ abstract class AbstractController implements ControllerInterface {
                }
                $controllerContext->setUriBuilder($this->uriBuilder);
 
-               $controllerContext->setFlashMessageContainer($this->flashMessageContainer);
                return $controllerContext;
        }
 
index 10fbb35..2934b80 100644 (file)
@@ -42,11 +42,6 @@ class ControllerContext {
        protected $uriBuilder;
 
        /**
-        * @var \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer
-        */
-       protected $flashMessageContainer;
-
-       /**
         * @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue
         */
        protected $flashMessageQueue;
@@ -146,54 +141,16 @@ class ControllerContext {
        }
 
        /**
-        * Set the flash messages
-        *
-        * @param \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer $flashMessageContainer
-        * @deprecated since 6.1, will be removed 2 versions later
-        * @return void
-        */
-       public function setFlashMessageContainer(\TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer $flashMessageContainer) {
-               $this->flashMessageContainer = $flashMessageContainer;
-               $flashMessageContainer->setControllerContext($this);
-       }
-
-       /**
-        * Get the flash messages
-        *
-        * @return \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer
-        * @deprecated since 6.1, will be removed 2 versions later
-        */
-       public function getFlashMessageContainer() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
-               return $this->flashMessageContainer;
-       }
-
-       /**
         * @return \TYPO3\CMS\Core\Messaging\FlashMessageQueue
         * @api
         */
        public function getFlashMessageQueue() {
                if (!$this->flashMessageQueue instanceof \TYPO3\CMS\Core\Messaging\FlashMessageQueue) {
-                       if ($this->useLegacyFlashMessageHandling()) {
-                               $this->flashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier();
-                       } else {
-                               $this->flashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(
-                                       'extbase.flashmessages.' . $this->extensionService->getPluginNamespace($this->request->getControllerExtensionName(), $this->request->getPluginName())
-                               );
-                       }
+                       $this->flashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier(
+                               'extbase.flashmessages.' . $this->extensionService->getPluginNamespace($this->request->getControllerExtensionName(), $this->request->getPluginName())
+                       );
                }
 
                return $this->flashMessageQueue;
        }
-
-       /**
-        * @deprecated since 6.1, will be removed 2 versions later
-        * @return boolean
-        */
-       public function useLegacyFlashMessageHandling() {
-               return (boolean) \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath(
-                       $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK),
-                       'legacy.enableLegacyFlashMessageHandling'
-               );
-       }
 }
diff --git a/typo3/sysext/extbase/Classes/Mvc/Controller/FlashMessageContainer.php b/typo3/sysext/extbase/Classes/Mvc/Controller/FlashMessageContainer.php
deleted file mode 100644 (file)
index e8d4f02..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-namespace TYPO3\CMS\Extbase\Mvc\Controller;
-
-/**
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-/**
- * This is a container for all Flash Messages. It is of scope session, but as Extbase
- * has no session scope, we need to save it manually.
- *
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
- * @api
- *
- * This object is deprecated as Extbase uses the FlashMessageService provided
- * by the core from 6.1 on. Therefore please do not use this object but call
- * (Abstract)Controller->controllerContext->getFlashMessageQueue() instead.
- *
- * For sure you are free to use TYPO3\CMS\Core\Messaging\FlashMessageService
- * and fetch a custom FlashMessageQueue by calling
- * FlashMessageQueue->getMessageQueueByIdentifier('customIdentifier')
- *
- * @deprecated since Extbase 6.1, will be removed 2 versions later
- */
-class FlashMessageContainer implements \TYPO3\CMS\Core\SingletonInterface {
-
-       /**
-        * @var \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
-        */
-       protected $controllerContext;
-
-       /**
-        * @param \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext
-        * @deprecated since 6.1, will be removed 2 versions later
-        */
-       public function setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext) {
-               $this->controllerContext = $controllerContext;
-       }
-
-       /**
-        * Add another flash message.
-        * Severity can be specified and must be one of
-        * \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE,
-        * \TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
-        * \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
-        * \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
-        * \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
-        *
-        * @param string $message
-        * @param string $title optional message title
-        * @param integer $severity optional severity code. One of the \TYPO3\CMS\Core\Messaging\FlashMessage constants
-        * @throws \InvalidArgumentException
-        * @return void
-        * @deprecated since 6.1, will be removed 2 versions later use Mvc\Controller\AbstractController->addFlashMessage instead
-        */
-       public function add($message, $title = '', $severity = \TYPO3\CMS\Core\Messaging\FlashMessage::OK) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
-               if (!is_string($message)) {
-                       throw new \InvalidArgumentException(
-                               'The flash message must be string, ' . gettype($message) . ' given.',
-                               1243258396
-                       );
-               }
-               /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */
-               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $message, $title, $severity, TRUE
-               );
-               $this->controllerContext->getFlashMessageQueue()->enqueue($flashMessage);
-       }
-
-       /**
-        * @return array An array of flash messages: array<\TYPO3\CMS\Core\Messaging\FlashMessage>
-        * @deprecated since 6.1, will be removed 2 versions later
-        */
-       public function getAllMessages() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
-               return $this->controllerContext->getFlashMessageQueue()->getAllMessages();
-       }
-
-       /**
-        * @return void
-        * @deprecated since 6.1, will be removed 2 versions later
-        */
-       public function flush() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
-               $this->controllerContext->getFlashMessageQueue()->getAllMessagesAndFlush();
-       }
-
-       /**
-        * @return array An array of flash messages: array<\TYPO3\CMS\Core\Messaging\FlashMessage>
-        * @deprecated since 6.1, will be removed 2 versions later
-        */
-       public function getAllMessagesAndFlush() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
-               return $this->controllerContext->getFlashMessageQueue()->getAllMessagesAndFlush();
-       }
-}
index c6a0677..65d3537 100644 (file)
@@ -59,7 +59,6 @@ return array(
        'Tx_Extbase_MVC_Controller_ControllerContext' => 'TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext',
        'Tx_Extbase_MVC_Controller_ControllerInterface' => 'TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerInterface',
        'Tx_Extbase_MVC_Controller_Exception_RequiredArgumentMissingException' => 'TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Exception\\RequiredArgumentMissingException',
-       'Tx_Extbase_MVC_Controller_FlashMessages' => 'TYPO3\\CMS\\Extbase\\Mvc\\Controller\\FlashMessageContainer',
        'Tx_Extbase_MVC_Controller_MvcPropertyMappingConfiguration' => 'TYPO3\\CMS\\Extbase\\Mvc\\Controller\\MvcPropertyMappingConfiguration',
        'Tx_Extbase_MVC_Dispatcher' => 'TYPO3\\CMS\\Extbase\\Mvc\\Dispatcher',
        'Tx_Extbase_MVC_Exception' => 'TYPO3\\CMS\\Extbase\\Mvc\\Exception',
index 5fed874..0817fc8 100644 (file)
@@ -97,7 +97,4 @@ config.tx_extbase {
                # if set to 1, the enable fields are ignored in BE context
                ignoreAllEnableFieldsInBe = 0
        }
-       legacy {
-               enableLegacyFlashMessageHandling = 1
-       }
 }
index 89a1184..f33f548 100644 (file)
@@ -82,11 +82,6 @@ class StandaloneViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $mockConfigurationManager;
 
        /**
-        * @var \TYPO3\CMS\Extbase\Mvc\Controller\FlashMessageContainer
-        */
-       protected $mockFlashMessageContainer;
-
-       /**
         * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
         */
        protected $mockContentObject;
@@ -112,7 +107,6 @@ class StandaloneViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                $this->mockObjectManager->expects($this->any())->method('get')->will($this->returnCallback(array($this, 'objectManagerCallback')));
                $this->mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
                $this->mockUriBuilder = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
-               $this->mockFlashMessageContainer = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\FlashMessageContainer');
                $this->mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
                $this->mockControllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext');
                $this->mockControllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($this->mockRequest));
@@ -161,8 +155,6 @@ class StandaloneViewTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                                return $this->mockUriBuilder;
                        case 'TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext':
                                return $this->mockControllerContext;
-                       case 'TYPO3\\CMS\\Extbase\\Mvc\\Controller\\FlashMessageContainer':
-                               return $this->mockFlashMessageContainer;
                        case 'TYPO3\\CMS\\Fluid\\Core\\Compiler\\TemplateCompiler':
                                return $this->mockTemplateCompiler;
                }