diff options
Diffstat (limited to 'plugins/SecurityInfo/PhpSecInfo/Test/Test_Application.php')
-rw-r--r-- | plugins/SecurityInfo/PhpSecInfo/Test/Test_Application.php | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/plugins/SecurityInfo/PhpSecInfo/Test/Test_Application.php b/plugins/SecurityInfo/PhpSecInfo/Test/Test_Application.php new file mode 100644 index 0000000000..af7a2f9926 --- /dev/null +++ b/plugins/SecurityInfo/PhpSecInfo/Test/Test_Application.php @@ -0,0 +1,54 @@ +<?php +/** + * Skeleton Test class file for Application group + * + * @package PhpSecInfo + * @author Anthon Pang + */ + +/** + * require the main PhpSecInfo class + */ +require_once(PHPSECINFO_BASE_DIR.'/Test/Test.php'); + + + +/** + * This is a skeleton class for PhpSecInfo "Application" tests + * @package PhpSecInfo + */ +class PhpSecInfo_Test_Application extends PhpSecInfo_Test +{ + + /** + * This value is used to group test results together. + * + * For example, all tests related to the mysql lib should be grouped under "mysql." + * + * @var string + */ + var $test_group = 'Application'; + + + /** + * "Application" tests should pretty much be always testable, so the default is just to return true + * + * @return boolean + */ + function isTestable() { + return Piwik_Http::getTransportMethod() !== null; + } + + function getMoreInfoURL() { + $urls = array( + 'Piwik' => 'http://piwik.org/changelog', + 'PHP' => 'http://php.net/', + ); + + if ($tn = $this->getTestName()) { + return $urls[$tn]; + } else { + return false; + } + } +} |