From df8a71470a6954323b4f1567e5221f7a56cba71d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 3 Jun 2016 16:13:21 +0800 Subject: [PATCH] UpdateDatabase.php --- UpdateDatabase.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/UpdateDatabase.php b/UpdateDatabase.php index c67fae96..437b1525 100644 --- a/UpdateDatabase.php +++ b/UpdateDatabase.php @@ -756,9 +756,16 @@ class Pman_Core_UpdateDatabase extends Pman $cm->test_class = $data['test_class']; } require_once $cm->test_class . '.php'; + $clsname = str_replace('/','_', $cm->test_class); - $method = new ReflectionMethod($clsname , 'test_'. $name) ; - if (!$method->isStatic()) { + try { + $method = new ReflectionMethod($clsname , 'test_'. $name) ; + $got_it = $method->isStatic(); + } catch($e) { + $got_it = false; + + } + if (!$got_it) { $this->jerr("template {$name} does not have a test method {$clsname}::test_{$name}"); } if ($up) { -- 2.39.2