TYPO3CMS
9.5
Main Page
Related Pages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
$
d
e
r
u
Functions
Variables
$
e
r
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
VariableFrontendTest.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Core\Tests\Functional\Cache\Frontend
;
3
4
/*
5
* This file is part of the TYPO3 CMS project.
6
*
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.
10
*
11
* For the full copyright and license information, please read the
12
* LICENSE.txt file that was distributed with this source code.
13
*
14
* The TYPO3 project - inspiring people to share!
15
*/
16
17
use
TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend
;
18
use
TYPO3\CMS\Core\Cache\Frontend\VariableFrontend
;
19
23
class
VariableFrontendTest
extends
\TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
24
{
25
public
function
insertSerializedArrayIntoLobAndRetrieveItDataProvider
()
26
{
27
$arrayToSerialize = [
28
'string'
=>
'Serialize a string'
,
29
'integer'
=> 0,
30
'anotherIntegerValue'
=> 123456,
31
'float'
=> 12.34,
32
'bool'
=>
true
,
33
'array'
=> [
34
0 =>
'test'
,
35
1 =>
'another test'
,
36
],
37
];
38
39
return
[
40
[
41
$arrayToSerialize,
42
'cache_pages'
,
43
$arrayToSerialize,
44
]
45
];
46
}
47
57
public
function
insertSerializedArrayIntoLobAndRetrieveIt
(
58
array $expected,
59
string
$identifier,
60
array $arrayToSerialize
61
) {
62
$typo3DatabaseBackend =
new
Typo3DatabaseBackend
(
'Testing'
);
63
$subject =
new
VariableFrontend
($identifier, $typo3DatabaseBackend);
64
65
$subject->set(
'myIdentifier'
, $arrayToSerialize);
66
$this->assertSame($expected, $subject->get(
'myIdentifier'
));
67
}
68
}
TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend
Definition:
Typo3DatabaseBackend.php:30
TYPO3\CMS\Core\Tests\Functional\Cache\Frontend\VariableFrontendTest\insertSerializedArrayIntoLobAndRetrieveIt
insertSerializedArrayIntoLobAndRetrieveIt(array $expected, string $identifier, array $arrayToSerialize)
Definition:
VariableFrontendTest.php:57
TYPO3\CMS\Core\Cache\Frontend\VariableFrontend
Definition:
VariableFrontend.php:24
TYPO3\CMS\Core\Tests\Functional\Cache\Frontend
Definition:
VariableFrontendTest.php:2
TYPO3\CMS\Core\Tests\Functional\Cache\Frontend\VariableFrontendTest
Definition:
VariableFrontendTest.php:24
TYPO3\CMS\Core\Tests\Functional\Cache\Frontend\VariableFrontendTest\insertSerializedArrayIntoLobAndRetrieveItDataProvider
insertSerializedArrayIntoLobAndRetrieveItDataProvider()
Definition:
VariableFrontendTest.php:25
doxygen
typo3
sysext
core
Tests
Functional
Cache
Frontend
VariableFrontendTest.php
Generated on Tue Oct 5 2021 01:57:17 for TYPO3CMS by
1.8.18