Commit 7c8501a1 authored by Thomas Maroschik's avatar Thomas Maroschik Committed by Christian Kuhn
Browse files

[TASK] Adopt tests to new classnames

Change-Id: I6d47d742afc0765bd9fd2aaf4b2fe45498f05f45
Resolves: #40109
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14023
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent 2aed998d
......@@ -24,8 +24,6 @@
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
// Make sure Swift's auto-loader is registered
require_once PATH_typo3 . 'contrib/swiftmailer/swift_required.php';
/*
* @deprecated since 6.0, the classname t3lib_mail_Mailer and this file is obsolete
* and will be removed by 7.0. The class was renamed and is now located at:
......
......@@ -241,7 +241,7 @@ return array(
),
'cache_runtime' => array(
'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
'backend' => 't3lib_cache_backend_TransientMemoryBackend',
'backend' => 'TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend',
'options' => array()
),
'cache_rootline' => array(
......
......@@ -24,10 +24,8 @@
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
require_once 'vfsStream/vfsStream.php';
require_once realpath(dirname(__FILE__) . '/../../../Unit/t3lib/file/BaseTestCase.php');
/**
* Functional test case for the FAL Storage.
*
......@@ -38,17 +36,15 @@ require_once realpath(dirname(__FILE__) . '/../../../Unit/t3lib/file/BaseTestCas
class t3lib_Tests_Functional_file_StorageTest extends t3lib_file_BaseTestCase {
/**
* @var t3lib_file_Storage
* @var \TYPO3\CMS\Core\Resource\ResourceStorage
*/
protected $fixture;
protected function prepareFixture() {
$this->initializeVfs();
$driver = new t3lib_file_Driver_LocalDriver(array('pathType' => 'absolute', 'basePath' => $this->getMountRootUrl()));
$driver = new \TYPO3\CMS\Core\Resource\Driver\LocalDriver(array('pathType' => 'absolute', 'basePath' => $this->getMountRootUrl()));
$driver->initialize();
$this->fixture = new t3lib_file_Storage($driver, array());
$this->fixture = new \TYPO3\CMS\Core\Resource\ResourceStorage($driver, array());
}
/**
......@@ -57,13 +53,11 @@ class t3lib_Tests_Functional_file_StorageTest extends t3lib_file_BaseTestCase {
* @test
*/
public function fileListingsDoNotContainHiddenFilesWithDefaultFilters() {
// we cannot use fixture->createFile() because touch() does not work with vfsStream
// we cannot use fixture->createFile() because touch() does not work with vfsStream
$this->addToMount(array('someFile' => '', '.someHiddenFile' => ''));
$this->prepareFixture();
$this->fixture->resetFileAndFolderNameFiltersToDefault();
$fileList = $this->fixture->getFileList('/');
$this->assertContains('someFile', array_keys($fileList));
$this->assertNotContains('.someHiddenFile', array_keys($fileList));
}
......@@ -76,13 +70,12 @@ class t3lib_Tests_Functional_file_StorageTest extends t3lib_file_BaseTestCase {
public function folderListingsDoNotContainHiddenFoldersByDefault() {
$this->addToMount(array('someFolder' => array(), '.someHiddenFolder' => array()));
$this->prepareFixture();
$this->fixture->resetFileAndFolderNameFiltersToDefault();
$folderList = $this->fixture->getFolderList('/');
$this->assertContains('someFolder', array_keys($folderList));
$this->assertNotContains('.someHiddenFolder', array_keys($folderList));
}
}
?>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009-2011 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
* Copyright notice
*
* (c) 2009-2011 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Testcase for the abstract cache backend
*
......@@ -35,7 +33,7 @@
class t3lib_cache_backend_AbstractBackendTest extends tx_phpunit_testcase {
/**
* @var t3lib_cache_backend_AbstractBackend
* @var \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
*/
protected $backend;
......@@ -44,8 +42,8 @@ class t3lib_cache_backend_AbstractBackendTest extends tx_phpunit_testcase {
*/
public function setUp() {
$className = 'ConcreteBackend_' . md5(uniqid(mt_rand(), TRUE));
eval('
class ' . $className. ' extends t3lib_cache_backend_AbstractBackend {
eval(('
class ' . $className) . ' extends TYPO3\\CMS\\Core\\Cache\\Backend\\AbstractBackend {
public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {}
public function get($entryIdentifier) {}
public function has($entryIdentifier) {}
......@@ -73,6 +71,7 @@ class t3lib_cache_backend_AbstractBackendTest extends tx_phpunit_testcase {
$backend = new $className('Testing', array('someOption' => 'someValue'));
$this->assertSame('someValue', $backend->getSomeOption());
}
}
?>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009-2011 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
* Copyright notice
*
* (c) 2009-2011 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Testcase for the APC cache backend
*
......@@ -42,7 +41,6 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
if (!extension_loaded('apc')) {
$this->markTestSkipped('APC extension was not available');
}
if (ini_get('apc.slam_defense') == 1) {
$this->markTestSkipped('This testcase can only be executed with apc.slam_defense = Off');
}
......@@ -50,10 +48,10 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
/**
* @test
* @expectedException t3lib_cache_Exception
* @expectedException \TYPO3\CMS\Core\Cache\Exception
*/
public function setThrowsExceptionIfNoFrontEndHasBeenSet() {
$backend = new t3lib_cache_backend_ApcBackend('Testing');
$backend = new \TYPO3\CMS\Core\Cache\Backend\ApcBackend('Testing');
$data = 'Some data';
$identifier = 'MyIdentifier' . md5(uniqid(mt_rand(), TRUE));
$backend->set($identifier, $data);
......@@ -115,14 +113,11 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
*/
public function findIdentifiersByTagFindsSetEntries() {
$backend = $this->setUpBackend();
$data = 'Some data';
$identifier = 'MyIdentifier' . md5(uniqid(mt_rand(), TRUE));
$backend->set($identifier, $data, array('UnitTestTag%tag1', 'UnitTestTag%tag2'));
$retrieved = $backend->findIdentifiersByTag('UnitTestTag%tag1');
$this->assertEquals($identifier, $retrieved[0], 'Could not retrieve expected entry by tag.');
$retrieved = $backend->findIdentifiersByTag('UnitTestTag%tag2');
$this->assertEquals($identifier, $retrieved[0], 'Could not retrieve expected entry by tag.');
}
......@@ -132,12 +127,10 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
*/
public function setRemovesTagsFromPreviousSet() {
$backend = $this->setUpBackend();
$data = 'Some data';
$identifier = 'MyIdentifier' . md5(uniqid(mt_rand(), TRUE));
$backend->set($identifier, $data, array('UnitTestTag%tag1', 'UnitTestTag%tagX'));
$backend->set($identifier, $data, array('UnitTestTag%tag3'));
$retrieved = $backend->findIdentifiersByTag('UnitTestTag%tagX');
$this->assertEquals(array(), $retrieved, 'Found entry which should no longer exist.');
}
......@@ -167,14 +160,11 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
*/
public function flushByTagRemovesCacheEntriesWithSpecifiedTag() {
$backend = $this->setUpBackend();
$data = 'some data' . microtime();
$backend->set('BackendAPCTest1', $data, array('UnitTestTag%test', 'UnitTestTag%boring'));
$backend->set('BackendAPCTest2', $data, array('UnitTestTag%test', 'UnitTestTag%special'));
$backend->set('BackendAPCTest3', $data, array('UnitTestTag%test'));
$backend->flushByTag('UnitTestTag%special');
$this->assertTrue($backend->has('BackendAPCTest1'), 'BackendAPCTest1');
$this->assertFalse($backend->has('BackendAPCTest2'), 'BackendAPCTest2');
$this->assertTrue($backend->has('BackendAPCTest3'), 'BackendAPCTest3');
......@@ -185,14 +175,11 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
*/
public function flushRemovesAllCacheEntries() {
$backend = $this->setUpBackend();
$data = 'some data' . microtime();
$backend->set('BackendAPCTest1', $data);
$backend->set('BackendAPCTest2', $data);
$backend->set('BackendAPCTest3', $data);
$backend->flush();
$this->assertFalse($backend->has('BackendAPCTest1'), 'BackendAPCTest1');
$this->assertFalse($backend->has('BackendAPCTest2'), 'BackendAPCTest2');
$this->assertFalse($backend->has('BackendAPCTest3'), 'BackendAPCTest3');
......@@ -202,20 +189,17 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
* @test
*/
public function flushRemovesOnlyOwnEntries() {
$thisCache = $this->getMock('t3lib_cache_frontend_Frontend', array(), array(), '', FALSE);
$thisCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\FrontendInterface', array(), array(), '', FALSE);
$thisCache->expects($this->any())->method('getIdentifier')->will($this->returnValue('thisCache'));
$thisBackend = new t3lib_cache_backend_ApcBackend('Testing');
$thisBackend = new \TYPO3\CMS\Core\Cache\Backend\ApcBackend('Testing');
$thisBackend->setCache($thisCache);
$thatCache = $this->getMock('t3lib_cache_frontend_Frontend', array(), array(), '', FALSE);
$thatCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\FrontendInterface', array(), array(), '', FALSE);
$thatCache->expects($this->any())->method('getIdentifier')->will($this->returnValue('thatCache'));
$thatBackend = new t3lib_cache_backend_ApcBackend('Testing');
$thatBackend = new \TYPO3\CMS\Core\Cache\Backend\ApcBackend('Testing');
$thatBackend->setCache($thatCache);
$thisBackend->set('thisEntry', 'Hello');
$thatBackend->set('thatEntry', 'World!');
$thatBackend->flush();
$this->assertEquals('Hello', $thisBackend->get('thisEntry'));
$this->assertFalse($thatBackend->has('thatEntry'));
}
......@@ -227,11 +211,9 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
*/
public function largeDataIsStored() {
$backend = $this->setUpBackend();
$data = str_repeat('abcde', 1024 * 1024);
$identifier = 'tooLargeData' . md5(uniqid(mt_rand(), TRUE));
$backend->set($identifier, $data);
$this->assertTrue($backend->has($identifier));
$this->assertEquals($backend->get($identifier), $data);
}
......@@ -239,15 +221,15 @@ class t3lib_cache_backend_ApcBackendTest extends tx_phpunit_testcase {
/**
* Sets up the APC backend used for testing
*
* @return t3lib_cache_backend_ApcBackend
* @return \TYPO3\CMS\Core\Cache\Backend\ApcBackend
*/
protected function setUpBackend() {
$cache = $this->getMock('t3lib_cache_frontend_Frontend', array(), array(), '', FALSE);
$backend = new t3lib_cache_backend_ApcBackend('Testing');
$cache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\FrontendInterface', array(), array(), '', FALSE);
$backend = new \TYPO3\CMS\Core\Cache\Backend\ApcBackend('Testing');
$backend->setCache($cache);
return $backend;
}
}
?>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009-2011 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
* Copyright notice
*
* (c) 2009-2011 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Testcase for the cache to memcached backend
*
......@@ -42,7 +41,6 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
if (!extension_loaded('memcache')) {
$this->markTestSkipped('memcache extension was not available');
}
try {
if (!fsockopen('localhost', 11211)) {
$this->markTestSkipped('memcached not reachable');
......@@ -54,11 +52,11 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
/**
* @test
* @expectedException t3lib_cache_Exception
* @expectedException \TYPO3\CMS\Core\Cache\Exception
*/
public function setThrowsExceptionIfNoFrontEndHasBeenSet() {
$backendOptions = array('servers' => array('localhost:11211'));
$backend = new t3lib_cache_backend_MemcachedBackend('Testing', $backendOptions);
$backend = new \TYPO3\CMS\Core\Cache\Backend\MemcachedBackend('Testing', $backendOptions);
$backend->initializeObject();
$data = 'Some data';
$identifier = 'MyIdentifier' . md5(uniqid(mt_rand(), TRUE));
......@@ -67,10 +65,10 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
/**
* @test
* @expectedException t3lib_cache_Exception
* @expectedException \TYPO3\CMS\Core\Cache\Exception
*/
public function initializeObjectThrowsExceptionIfNoMemcacheServerIsConfigured() {
$backend = new t3lib_cache_backend_MemcachedBackend('Testing');
$backend = new \TYPO3\CMS\Core\Cache\Backend\MemcachedBackend('Testing');
$backend->initializeObject();
}
......@@ -130,14 +128,11 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
*/
public function findIdentifiersByTagFindsCacheEntriesWithSpecifiedTag() {
$backend = $this->setUpBackend();
$data = 'Some data';
$identifier = 'MyIdentifier' . md5(uniqid(mt_rand(), TRUE));
$backend->set($identifier, $data, array('UnitTestTag%tag1', 'UnitTestTag%tag2'));
$retrieved = $backend->findIdentifiersByTag('UnitTestTag%tag1');
$this->assertEquals($identifier, $retrieved[0], 'Could not retrieve expected entry by tag.');
$retrieved = $backend->findIdentifiersByTag('UnitTestTag%tag2');
$this->assertEquals($identifier, $retrieved[0], 'Could not retrieve expected entry by tag.');
}
......@@ -147,12 +142,10 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
*/
public function setRemovesTagsFromPreviousSet() {
$backend = $this->setUpBackend();
$data = 'Some data';
$identifier = 'MyIdentifier' . md5(uniqid(mt_rand(), TRUE));
$backend->set($identifier, $data, array('UnitTestTag%tag1', 'UnitTestTag%tag2'));
$backend->set($identifier, $data, array('UnitTestTag%tag3'));
$retrieved = $backend->findIdentifiersByTag('UnitTestTag%tagX');
$this->assertEquals(array(), $retrieved, 'Found entry which should no longer exist.');
}
......@@ -182,14 +175,11 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
*/
public function flushByTagRemovesCacheEntriesWithSpecifiedTag() {
$backend = $this->setUpBackend();
$data = 'some data' . microtime();
$backend->set('BackendMemcacheTest1', $data, array('UnitTestTag%test', 'UnitTestTag%boring'));
$backend->set('BackendMemcacheTest2', $data, array('UnitTestTag%test', 'UnitTestTag%special'));
$backend->set('BackendMemcacheTest3', $data, array('UnitTestTag%test'));
$backend->flushByTag('UnitTestTag%special');
$this->assertTrue($backend->has('BackendMemcacheTest1'), 'BackendMemcacheTest1');
$this->assertFalse($backend->has('BackendMemcacheTest2'), 'BackendMemcacheTest2');
$this->assertTrue($backend->has('BackendMemcacheTest3'), 'BackendMemcacheTest3');
......@@ -200,14 +190,11 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
*/
public function flushRemovesAllCacheEntries() {
$backend = $this->setUpBackend();
$data = 'some data' . microtime();
$backend->set('BackendMemcacheTest1', $data);
$backend->set('BackendMemcacheTest2', $data);
$backend->set('BackendMemcacheTest3', $data);
$backend->flush();
$this->assertFalse($backend->has('BackendMemcacheTest1'), 'BackendMemcacheTest1');
$this->assertFalse($backend->has('BackendMemcacheTest2'), 'BackendMemcacheTest2');
$this->assertFalse($backend->has('BackendMemcacheTest3'), 'BackendMemcacheTest3');
......@@ -218,23 +205,19 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
*/
public function flushRemovesOnlyOwnEntries() {
$backendOptions = array('servers' => array('localhost:11211'));
$thisCache = $this->getMock('t3lib_cache_frontend_AbstractFrontend', array(), array(), '', FALSE);
$thisCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array(), array(), '', FALSE);
$thisCache->expects($this->any())->method('getIdentifier')->will($this->returnValue('thisCache'));
$thisBackend = new t3lib_cache_backend_MemcachedBackend('Testing', $backendOptions);
$thisBackend = new \TYPO3\CMS\Core\Cache\Backend\MemcachedBackend('Testing', $backendOptions);
$thisBackend->setCache($thisCache);
$thisBackend->initializeObject();
$thatCache = $this->getMock('t3lib_cache_frontend_AbstractFrontend', array(), array(), '', FALSE);
$thatCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array(), array(), '', FALSE);
$thatCache->expects($this->any())->method('getIdentifier')->will($this->returnValue('thatCache'));
$thatBackend = new t3lib_cache_backend_MemcachedBackend('Testing', $backendOptions);
$thatBackend = new \TYPO3\CMS\Core\Cache\Backend\MemcachedBackend('Testing', $backendOptions);
$thatBackend->setCache($thatCache);
$thatBackend->initializeObject();
$thisBackend->set('thisEntry', 'Hello');
$thatBackend->set('thatEntry', 'World!');
$thatBackend->flush();
$this->assertEquals('Hello', $thisBackend->get('thisEntry'));
$this->assertFalse($thatBackend->has('thatEntry'));
}
......@@ -247,10 +230,8 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
*/
public function largeDataIsStored() {
$backend = $this->setUpBackend();
$data = str_repeat('abcde', 1024 * 1024);
$backend->set('tooLargeData', $data);
$this->assertTrue($backend->has('tooLargeData'));
$this->assertEquals($backend->get('tooLargeData'), $data);
}
......@@ -259,19 +240,19 @@ class t3lib_cache_backend_MemcachedBackendTest extends tx_phpunit_testcase {
* Sets up the memcached backend used for testing
*
* @param array $backendOptions Options for the memcache backend
* @return t3lib_cache_backend_MemcachedBackend
* @return \TYPO3\CMS\Core\Cache\Backend\MemcachedBackend
*/
protected function setUpBackend(array $backendOptions = array()) {
$cache = $this->getMock('t3lib_cache_frontend_Frontend', array(), array(), '', FALSE);
$cache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\FrontendInterface', array(), array(), '', FALSE);
if ($backendOptions == array()) {
$backendOptions = array('servers' => array('localhost:11211'));
}
$backend = new t3lib_cache_backend_MemcachedBackend('Testing', $backendOptions);
$backend = new \TYPO3\CMS\Core\Cache\Backend\MemcachedBackend('Testing', $backendOptions);
$backend->setCache($cache);
$backend->initializeObject();
return $backend;
}
}
?>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009-2011 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
* Copyright notice
*
* (c) 2009-2011 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**