[TASK] WincacheBackend: Add a "Testing"-context to the tests 59/19459/3
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 31 Mar 2013 13:20:47 +0000 (15:20 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 31 Mar 2013 14:03:31 +0000 (16:03 +0200)
Resolves: #46817
Related: #46768
Releases: 6.0
Change-Id: I5ebc5f026d92ae8070c2dbfd4679e2889bad6c07
Reviewed-on: https://review.typo3.org/19459
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Tests/Unit/Cache/Backend/WincacheBackendTest.php

index 3beb27f..1271547 100644 (file)
@@ -47,7 +47,7 @@ class WincacheBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @expectedException \TYPO3\CMS\Core\Cache\Exception
         */
        public function setThrowsExceptionIfNoFrontEndHasBeenSet() {
-               $backend = new \TYPO3\CMS\Core\Cache\Backend\WincacheBackend();
+               $backend = new \TYPO3\CMS\Core\Cache\Backend\WincacheBackend('Testing');
                $data = 'Some data';
                $identifier = 'MyIdentifier' . md5(uniqid(mt_rand(), TRUE));
                $backend->set($identifier, $data);
@@ -187,11 +187,11 @@ class WincacheBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function flushRemovesOnlyOwnEntries() {
                $thisCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\FrontendInterface', array(), array(), '', FALSE);
                $thisCache->expects($this->any())->method('getIdentifier')->will($this->returnValue('thisCache'));
-               $thisBackend = new \TYPO3\CMS\Core\Cache\Backend\WincacheBackend();
+               $thisBackend = new \TYPO3\CMS\Core\Cache\Backend\WincacheBackend('Testing');
                $thisBackend->setCache($thisCache);
                $thatCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\FrontendInterface', array(), array(), '', FALSE);
                $thatCache->expects($this->any())->method('getIdentifier')->will($this->returnValue('thatCache'));
-               $thatBackend = new \TYPO3\CMS\Core\Cache\Backend\WincacheBackend();
+               $thatBackend = new \TYPO3\CMS\Core\Cache\Backend\WincacheBackend('Testing');
                $thatBackend->setCache($thatCache);
                $thisBackend->set('thisEntry', 'Hello');
                $thatBackend->set('thatEntry', 'World!');
@@ -221,7 +221,7 @@ class WincacheBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        protected function setUpBackend() {
                $cache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\FrontendInterface', array(), array(), '', FALSE);
-               $backend = new \TYPO3\CMS\Core\Cache\Backend\WincacheBackend();
+               $backend = new \TYPO3\CMS\Core\Cache\Backend\WincacheBackend('Testing');
                $backend->setCache($cache);
                return $backend;
        }