mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-19 04:12:31 +02:00
[3.1.0] When flush fails, fail SimpleTest
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1641 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -59,12 +59,17 @@ if ($AC['disable-phpt'] && $AC['only-phpt']) {
|
||||
|
||||
// Shell-script code is executed
|
||||
|
||||
if ($AC['xml']) {
|
||||
if (!SimpleReporter::inCli()) header('Content-Type: text/xml;charset=UTF-8');
|
||||
$reporter = new XmlReporter();
|
||||
} elseif (SimpleReporter::inCli()) {
|
||||
$reporter = new TextReporter();
|
||||
} else {
|
||||
$reporter = new HTMLPurifier_SimpleTest_Reporter('UTF-8', $AC);
|
||||
}
|
||||
|
||||
if ($AC['flush']) {
|
||||
if (SimpleReporter::inCli() && !$AC['xml']) {
|
||||
passthru($AC['php'] . ' ../maintenance/flush.php');
|
||||
} else {
|
||||
shell_exec($AC['php'] . ' ../maintenance/flush.php');
|
||||
}
|
||||
htmlpurifier_flush($AC['php'], $reporter);
|
||||
}
|
||||
|
||||
// initialize and load HTML Purifier
|
||||
@@ -157,15 +162,6 @@ if ($AC['file']) {
|
||||
|
||||
}
|
||||
|
||||
if ($AC['xml']) {
|
||||
if (!SimpleReporter::inCli()) header('Content-Type: text/xml;charset=UTF-8');
|
||||
$reporter = new XmlReporter();
|
||||
} elseif (SimpleReporter::inCli()) {
|
||||
$reporter = new TextReporter();
|
||||
} else {
|
||||
$reporter = new HTMLPurifier_SimpleTest_Reporter('UTF-8', $AC);
|
||||
}
|
||||
|
||||
if ($AC['dry']) $reporter->makeDry();
|
||||
|
||||
$test->run($reporter);
|
||||
|
Reference in New Issue
Block a user