/** * Test suite * * @return PHPUnit_Framework_TestSuite */ public static function suite() { $suite = new PHPUnit_Framework_TestSuite('Firal CMS'); $suite->addTest(Firal_AllTests::suite()); $suite->addTest(Modules_AllTests::suite()); return $suite; }
public static function suite() { $suite = new PHPUnit_Framework_TestSuite('Centurion Suite'); $suite->addTest(Centurion_AllTests::suite()); $suite->addTest(Modules_AllTests::suite()); return $suite; }
public static function suite() { $suite = new PHPUnit_Framework_TestSuite('Suíte de testes unitários do projeto'); $suite->addTest(App_AllTests::suite()); $suite->addTest(Core_AllTests::suite()); $suite->addTest(CoreExt_AllTests::suite()); $suite->addTest(Utils_AllTests::suite()); $suite->addTest(Modules_AllTests::suite()); return $suite; }
PHPUnit_TextUI_TestRunner::run(self::suite()); } protected static function _formatModuleName($name) { $name = strtolower($name); $name = str_replace(array('-', '.'), ' ', $name); $name = ucwords($name); $name = str_replace(' ', '', $name); return $name; } public static function suite() { global $application; $suite = new PHPUnit_Framework_TestSuite('Modules Suite'); $bootstrap = $application->getBootstrap(); $moduleRessource = $bootstrap->getResource('modules'); $front = $bootstrap->getResource('FrontController'); $modules = $front->getControllerDirectory(); foreach ($modules as $key => $val) { $className = self::_formatModuleName($key) . '_Test_AllTests'; if (class_exists($className, true)) { $suiteFunctionName = array($className, 'suite'); $suite->addTest(call_user_func($suiteFunctionName)); } } return $suite; } } if (PHPUnit_MAIN_METHOD == 'Modules_AllTests::main') { Modules_AllTests::main(); }
public function setUp() { $this->bootstrap = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . DIRECTORY_SEPARATOR . 'configs' . DIRECTORY_SEPARATOR . 'config.php'); parent::setUp(); Modules_AllTests::setUpDb($this->bootstrap->getBootstrap()->getResource('db')); }