public static function suite() { $suite = new PHPUnit_Framework_TestSuite('HTML_QuickForm2 package - QuickForm2'); $suite->addTestSuite('HTML_QuickForm2_FactoryTest'); $suite->addTestSuite('HTML_QuickForm2_NodeTest'); $suite->addTestSuite('HTML_QuickForm2_ElementTest'); $suite->addTestSuite('HTML_QuickForm2_ContainerTest'); $suite->addTestSuite('HTML_QuickForm2_ContainerOverloadTest'); $suite->addTestSuite('HTML_QuickForm2_RuleTest'); $suite->addTest(QuickForm2_Element_AllTests::suite()); $suite->addTest(QuickForm2_Container_AllTests::suite()); $suite->addTest(QuickForm2_DataSource_AllTests::suite()); $suite->addTest(QuickForm2_Rule_AllTests::suite()); return $suite; }
class QuickForm2_Rule_AllTests { public static function main() { if (!class_exists('PHPUnit_TextUI_TestRunner', true)) { require_once 'PHPUnit/TextUI/TestRunner.php'; } PHPUnit_TextUI_TestRunner::run(self::suite()); } public static function suite() { $suite = new PHPUnit_Framework_TestSuite('HTML_QuickForm2 package - QuickForm2 - Rule'); $suite->addTestSuite('HTML_QuickForm2_Rule_NonemptyTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_RequiredTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_CompareTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_EmptyTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_RegexTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_CallbackTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_LengthTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_MaxFileSizeTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_MimeTypeTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_EachTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_NotCallbackTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_NotRegexTest'); $suite->addTestSuite('HTML_QuickForm2_Rule_EmailTest'); return $suite; } } if (PHPUnit_MAIN_METHOD == 'QuickForm2_Rule_AllTests::main') { QuickForm2_Rule_AllTests::main(); }