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
PageLinkHandlerTest.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Core\Tests\Unit\LinkHandling
;
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\LinkHandling\PageLinkHandler
;
18
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
19
20
class
PageLinkHandlerTest
extends
UnitTestCase
21
{
22
28
public
function
resolveParametersForNonFilesDataProvider
()
29
{
30
return
[
31
'current page - cool style'
=> [
32
[
33
'uid'
=>
'current'
34
],
35
[
36
'pageuid'
=>
'current'
37
],
38
't3://page?uid=current'
39
],
40
'current empty page - cool style'
=> [
41
[
42
43
],
44
[
45
'pageuid'
=>
'current'
46
],
47
't3://page?uid=current'
48
],
49
'simple page - cool style'
=> [
50
[
51
'uid'
=> 13
52
],
53
[
54
'pageuid'
=> 13
55
],
56
't3://page?uid=13'
57
],
58
'page with alias - cool style'
=> [
59
[
60
'alias'
=>
'alias13'
61
],
62
[
63
'pagealias'
=>
'alias13'
64
],
65
't3://page?alias=alias13'
66
],
67
'page with alias and type - cool style'
=> [
68
[
69
'alias'
=>
'alias13'
,
70
'type'
=> 31
71
],
72
[
73
'pagealias'
=>
'alias13'
,
74
'pagetype'
=>
'31'
75
],
76
't3://page?alias=alias13&type=31'
77
],
78
'page with alias and parameters - cool style'
=> [
79
[
80
'alias'
=>
'alias13'
,
81
'my'
=>
'additional'
,
82
'parameter'
=>
'that'
,
83
'are'
=>
'nice'
84
],
85
[
86
'pagealias'
=>
'alias13'
,
87
'parameters'
=>
'my=additional¶meter=that&are=nice'
88
],
89
't3://page?alias=alias13&my=additional¶meter=that&are=nice'
,
90
],
91
'page with alias and parameters and fragment - cool style'
=> [
92
[
93
'alias'
=>
'alias13'
,
94
'my'
=>
'additional'
,
95
'parameter'
=>
'that'
,
96
'are'
=>
'nice'
97
],
98
[
99
'pagealias'
=>
'alias13'
,
100
'parameters'
=>
'my=additional¶meter=that&are=nice'
,
101
'fragment'
=>
'again'
102
],
103
't3://page?alias=alias13&my=additional¶meter=that&are=nice#again'
,
104
]
105
];
106
}
107
117
public
function
resolveReturnsSplitParameters
($input, $expected, $finalString)
118
{
119
$subject =
new
PageLinkHandler
();
120
// fragment it is processed outside handler data
121
if
(isset($expected[
'fragment'
])) {
122
unset($expected[
'fragment'
]);
123
}
124
$this->assertEquals($expected, $subject->resolveHandlerData($input));
125
}
126
136
public
function
splitParametersToUnifiedIdentifier
($input, $parameters, $expected)
137
{
138
$subject =
new
PageLinkHandler
();
139
$this->assertEquals($expected, $subject->asString($parameters));
140
}
141
}
TYPO3\CMS\Core\Tests\Unit\LinkHandling\PageLinkHandlerTest\resolveReturnsSplitParameters
resolveReturnsSplitParameters($input, $expected, $finalString)
Definition:
PageLinkHandlerTest.php:117
TYPO3\CMS\Core\Tests\Unit\LinkHandling
Definition:
EmailLinkHandlerTest.php:2
TYPO3\CMS\Core\Tests\Unit\LinkHandling\PageLinkHandlerTest\splitParametersToUnifiedIdentifier
splitParametersToUnifiedIdentifier($input, $parameters, $expected)
Definition:
PageLinkHandlerTest.php:136
TYPO3\CMS\Core\Tests\Unit\LinkHandling\PageLinkHandlerTest
Definition:
PageLinkHandlerTest.php:21
TYPO3\CMS\Core\Tests\Unit\LinkHandling\PageLinkHandlerTest\resolveParametersForNonFilesDataProvider
array resolveParametersForNonFilesDataProvider()
Definition:
PageLinkHandlerTest.php:28
TYPO3\CMS\Core\LinkHandling\PageLinkHandler
Definition:
PageLinkHandler.php:22
doxygen
typo3
sysext
core
Tests
Unit
LinkHandling
PageLinkHandlerTest.php
Generated on Tue Oct 5 2021 01:57:24 for TYPO3CMS by
1.8.18