Skip to content
Snippets Groups Projects
Commit d48c65ab authored by Jared Hancock's avatar Jared Hancock
Browse files

Complete lint testing for mPDF

parent 65224786
Branches
Tags
No related merge requests found
......@@ -14,7 +14,7 @@ class Test {
'/setup/cli/stage/',
'/include/plugins/',
'/include/h2o/',
'/include/fpdf/',
'/include/mpdf/',
);
function Test() {
......
......@@ -6,7 +6,7 @@ class SyntaxTest extends Test {
function testCompileErrors() {
$exit = 0;
foreach ($this->getAllScripts() as $s) {
foreach ($this->getAllScripts(false) as $s) {
ob_start();
system("php -l $s", $exit);
$line = ob_get_contents();
......
......@@ -17,10 +17,14 @@ class UndefinedMethods extends Test {
}
foreach (find_function_calls($scripts) as $call) {
list($file, $no, $line, $func) = $call;
if (!in_array($func, $function_defs))
$this->fail($file, $no, "$func: Definitely undefined");
else
if (!in_array($func, $function_defs)) {
// We don't ship all of mdpf, so a bit of it looks undefined
if (strpos($file, '/mpdf/') === false)
$this->fail($file, $no, "$func: Definitely undefined");
}
else {
$this->pass();
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment