2 namespace TYPO3\CMS\Core\Tests\Functional\Cache\Frontend
;
5 * This file is part of the TYPO3 CMS project.
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
14 * The TYPO3 project - inspiring people to share!
17 use TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend
;
18 use TYPO3\CMS\Core\Cache\Frontend\VariableFrontend
;
23 class VariableFrontendTest
extends \TYPO3\CMS\Components\TestingFramework\Core\FunctionalTestCase
25 public function insertSerializedArrayIntoLobAndRetrieveItDataProvider()
28 'string' => 'Serialize a string',
30 'anotherIntegerValue' => 123456,
49 * @dataProvider insertSerializedArrayIntoLobAndRetrieveItDataProvider
53 * @param array $expected
54 * @param string $identifier
55 * @param array $arrayToSerialize
57 public function insertSerializedArrayIntoLobAndRetrieveIt(
60 array $arrayToSerialize
62 $typo3DatabaseBackend = new Typo3DatabaseBackend('Testing');
63 $subject = new VariableFrontend($identifier, $typo3DatabaseBackend);
65 $subject->set('myIdentifier', $arrayToSerialize);
66 $this->assertSame($expected, $subject->get('myIdentifier'));