1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 05:37:49 +02:00

PSR-2 reformatting PHPDoc corrections

With minor corrections.

Signed-off-by: Marcus Bointon <marcus@synchromedia.co.uk>
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Marcus Bointon
2013-07-16 13:56:14 +02:00
committed by Edward Z. Yang
parent 19eee14899
commit fac747bdbd
433 changed files with 13302 additions and 6690 deletions

View File

@@ -3,52 +3,61 @@
class HTMLPurifier_Injector_PurifierLinkifyTest extends HTMLPurifier_InjectorHarness
{
function setup() {
public function setup()
{
parent::setup();
$this->config->set('AutoFormat.PurifierLinkify', true);
$this->config->set('AutoFormat.PurifierLinkify.DocURL', '#%s');
}
function testNoTriggerCharacer() {
public function testNoTriggerCharacer()
{
$this->assertResult('Foobar');
}
function testTriggerCharacterInIrrelevantContext() {
public function testTriggerCharacterInIrrelevantContext()
{
$this->assertResult('20% off!');
}
function testPreserveNamespace() {
public function testPreserveNamespace()
{
$this->assertResult('%Core namespace (not recognized)');
}
function testLinkifyBasic() {
public function testLinkifyBasic()
{
$this->assertResult(
'%Namespace.Directive',
'<a href="#Namespace.Directive">%Namespace.Directive</a>'
);
}
function testLinkifyWithAdjacentTextNodes() {
public function testLinkifyWithAdjacentTextNodes()
{
$this->assertResult(
'This %Namespace.Directive thing',
'This <a href="#Namespace.Directive">%Namespace.Directive</a> thing'
);
}
function testLinkifyInBlock() {
public function testLinkifyInBlock()
{
$this->assertResult(
'<div>This %Namespace.Directive thing</div>',
'<div>This <a href="#Namespace.Directive">%Namespace.Directive</a> thing</div>'
);
}
function testPreserveInATag() {
public function testPreserveInATag()
{
$this->assertResult(
'<a>%Namespace.Directive</a>'
);
}
function testNeeded() {
public function testNeeded()
{
$this->config->set('HTML.Allowed', 'b');
$this->expectError('Cannot enable PurifierLinkify injector because a is not allowed');
$this->assertResult('%Namespace.Directive');