Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Centurion Suite');
     $suite->addTest(Centurion_AllTests::suite());
     $suite->addTest(Modules_AllTests::suite());
     return $suite;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
        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();
}
Ejemplo n.º 5
0
 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'));
 }