TYPO3 CMS
TYPO3_6-2
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
r
s
t
u
v
w
+
Files
File List
+
File Members
+
All
$
(
_
a
c
d
e
f
h
i
l
o
p
r
s
t
u
x
+
Functions
_
a
c
d
e
f
i
l
o
p
r
s
u
x
+
Variables
$
(
_
a
d
e
h
i
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
DebugExceptionHandlerTest.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Core\Tests\Unit\Error
;
3
22
class
DebugExceptionHandlerTest
extends
\TYPO3\CMS\Core\Tests\UnitTestCase
{
23
27
protected
$fixture
= NULL;
28
32
protected
function
setUp
() {
33
$this->fixture = $this->getMock(
'TYPO3\\CMS\\Core\\Error\\DebugExceptionHandler'
, array(
'sendStatusHeaders'
,
'writeLogEntries'
), array(),
''
, FALSE);
34
$this->fixture->expects($this->any())->method(
'discloseExceptionInformation'
)->will($this->returnValue(TRUE));
35
}
36
40
public
function
echoExceptionWebEscapesExceptionMessage
() {
41
$message =
'<b>b</b><script>alert(1);</script>'
;
42
$exception = new \Exception($message);
43
ob_start();
44
$this->fixture->echoExceptionWeb($exception);
45
$output = ob_get_contents();
46
ob_end_clean();
47
$this->assertContains(htmlspecialchars($message), $output);
48
$this->assertNotContains($message, $output);
49
}
50
51
}
TYPO3\CMS\Core\Tests\Unit\Error\DebugExceptionHandlerTest\setUp
setUp()
Definition:
DebugExceptionHandlerTest.php:32
TYPO3\CMS\Core\Tests\Unit\Error
Definition:
DebugExceptionHandlerTest.php:2
TYPO3\CMS\Core\Tests\Unit\Error\DebugExceptionHandlerTest
Definition:
DebugExceptionHandlerTest.php:22
TYPO3\CMS\Core\Tests\Unit\Error\DebugExceptionHandlerTest\echoExceptionWebEscapesExceptionMessage
echoExceptionWebEscapesExceptionMessage()
Definition:
DebugExceptionHandlerTest.php:40
TYPO3\CMS\Core\Tests\UnitTestCase
Definition:
UnitTestCase.php:26
TYPO3\CMS\Core\Tests\Unit\Error\DebugExceptionHandlerTest\$fixture
$fixture
Definition:
DebugExceptionHandlerTest.php:27
typo3
sysext
core
Tests
Unit
Error
DebugExceptionHandlerTest.php
Generated on Wed Aug 7 2019 09:52:23 for TYPO3 CMS by
1.8.13