run() public static method

public static run ( PHPUnit_Framework_Test | ReflectionClass $test, array $arguments = [] ) : PHPUnit_Framework_TestResult
$test PHPUnit_Framework_Test | ReflectionClass
$arguments array
return PHPUnit_Framework_TestResult
    /**
     * Runs the test methods of this class.
     *
     * @return void
     */
    public static function main()
    {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("Zend_Loader_PluginLoaderTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
Esempio n. 2
0
    /**
     * Runs the test methods of this class.
     *
     * @access public
     * @static
     */
    public static function main()
    {
        require_once('PHPUnit/TextUI/TestRunner.php');

        $suite  = new PHPUnit_Framework_TestSuite('CampDatabaseTest');
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
Esempio n. 3
0
    public static function main()
    {

        $suite = new PHPUnit_Framework_TestSuite( 'AllTests' );
        $suite->addTestSuite( 'MKVMergeCommandGeneratorTest' );
        $result = PHPUnit_TextUI_TestRunner::run( $suite );
    }
 public static function main()
 {
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_SESSIONHANDLER_RUNTESTS) {
         $suite = new PHPUnit_Framework_TestSuite("Zend_Service_WindowsAzure_BlobSessionHandlerTest");
         $result = PHPUnit_TextUI_TestRunner::run($suite);
     }
 }
    /**
     * Runs the test methods of this class.
     */
    public static function main()
    {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("Zend_Controller_Action_Helper_RedirectorTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
 public function testDB()
 {
     $test_suites = new PHPUnit_Framework_TestSuite();
     $test_suites->addTestSuite('Socialad_DB_Test');
     $arguments = array();
     PHPUnit_TextUI_TestRunner::run($test_suites, $arguments);
 }
 public static function main()
 {
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_MANAGEMENT_RUNTESTS) {
         $suite = new PHPUnit_Framework_TestSuite("Zend_Service_WindowsAzure_Management_ManagementClientTest");
         $result = PHPUnit_TextUI_TestRunner::run($suite);
     }
 }
Esempio n. 8
0
    /**
     * Runs the test methods of this class.
     *
     * @return void
     */
    public static function main()
    {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("Zend_Form_Decorator_HtmlTagTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
Esempio n. 9
0
    /**
     * Runs the test methods of this class.
     *
     * @access public
     * @static
     */
    public static function main()
    {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("Zend_InfoCard_ProcessTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
Esempio n. 10
0
    /**
     * Runs the test methods of this class.
     *
     * @return void
     */
    public static function main()
    {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("Zend_Form_Element_SelectTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
    /**
     * Runs the test methods of this class.
     *
     * @return void
     */
    public static function main()
    {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("Zend_View_Helper_Placeholder_StandaloneContainerTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
Esempio n. 12
0
 public static function main()
 {
     if (TESTS_ZEND_SERVICE_WINDOWSAZURE_QUEUE_RUNTESTS) {
         $suite = new PHPUnit_Framework_TestSuite("Zend_Service_WindowsAzure_QueueStorageTest");
         $result = PHPUnit_TextUI_TestRunner::run($suite);
     }
 }
 public static function main()
 {
     if (!function_exists('phpunit_autoload')) {
         require_once 'PHPUnit/TextUI/TestRunner.php';
     }
     PHPUnit_TextUI_TestRunner::run(self::suite());
 }
Esempio n. 14
0
 /**
  *
  */
 public function indexAction()
 {
     $argv = $this->getRequest()->getServer('argv');
     $test_to_run = isset($argv[3]) ? $argv[3] : Const_Tests::RUN_ALL_TESTS;
     $test_to_run = str_replace('_', '/', $test_to_run);
     foreach (Core_Files::listFiles(cfg()->tests_path) as $test) {
         if (!strstr($test, $test_to_run . '.php') && $test_to_run != Const_Tests::RUN_ALL_TESTS) {
             continue;
         }
         $class_path = str_replace(cfg()->tests_path, '', $test);
         $class_path_frag = explode('/', $class_path);
         $class_path_frag = array_map("ucfirst", $class_path_frag);
         $class_path_frag[count($class_path_frag) - 1] = str_replace('.php', '', $class_path_frag[count($class_path_frag) - 1]);
         $class = implode('_', $class_path_frag);
         $class_name = 'Tests_' . $class . 'File';
         echo '--------------------------------------' . PHP_EOL;
         echo 'Running test: ' . $class_name . PHP_EOL;
         echo '--------------------------------------' . PHP_EOL;
         $phpunit = new PHPUnit_TextUI_TestRunner();
         $phpunit->run($phpunit->getTest($class_name, $test), array('colors' => 'auto'));
         if ($test_to_run != Const_Tests::RUN_ALL_TESTS) {
             die;
         }
         echo PHP_EOL . PHP_EOL;
     }
     die;
 }
    /**
     * Runs the test methods of this class.
     *
     * @access public
     * @static
     */
    public static function main()
    {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("Zend_View_Helper_FormCheckboxTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
Esempio n. 16
0
    /**
     * Runs the test methods of this class.
     *
     * @access public
     * @static
     */
    public static function main()
    {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("Zend_Controller_Dispatcher_StandardTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
    /**
     * Runs the test methods of this class.
     *
     * @access public
     * @static
     */
    public static function main()
    {
        require_once('PHPUnit/TextUI/TestRunner.php');

        $suite  = new PHPUnit_Framework_TestSuite('ArticleAttachmentTest');
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }
Esempio n. 18
0
 public static function main()
 {
     if (!class_exists('PHPUnit_TextUI_TestRunner', true)) {
         require_once 'PHPUnit/TextUI/TestRunner.php';
     }
     PHPUnit_TextUI_TestRunner::run(self::suite());
 }
Esempio n. 19
0
 public function run($className)
 {
     $rootPath = str_replace('\\', '/', $this->application->config()['paths']['root']);
     $reflection = new \ReflectionClass($className);
     $testRunner = new TestRunner();
     $testRunner->run($reflection);
 }
 public static function main()
 {
     if (stream_resolve_include_path('PHPUnit/TextUI/TestRunner.php')) {
         include_once 'PHPUnit/TextUI/TestRunner.php';
     }
     PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite('HTML_Page2_GetBodyContent_Test'));
 }
Esempio n. 21
0
 public static function main()
 {
     if (defined('TESTS_ZEND_LOCALE_FORMAT_SETLOCALE') && TESTS_ZEND_LOCALE_FORMAT_SETLOCALE) {
         // run all tests in a special locale
         setlocale(LC_ALL, TESTS_ZEND_LOCALE_FORMAT_SETLOCALE);
     }
     PHPUnit_TextUI_TestRunner::run(self::suite());
 }
Esempio n. 22
0
 public static function main()
 {
     $parameters = array();
     if (TESTS_GENERATE_REPORT && extension_loaded('xdebug')) {
         $parameters['reportDirectory'] = TESTS_GENERATE_REPORT_TARGET;
     }
     PHPUnit_TextUI_TestRunner::run(self::suite(), $parameters);
 }
Esempio n. 23
0
 /**
  * Runs this test suite
  *
  * @return void
  */
 public static function main()
 {
     /**
      * PHPUnit_TextUI_TestRunner
      */
     require_once 'PHPUnit/TextUI/TestRunner.php';
     PHPUnit_TextUI_TestRunner::run(self::suite());
 }
 public static function main()
 {
     $parameters = array();
     //$parameters['testdoxHTMLFile'] = true;
     //$parameters['printer'] = PHPUnit_Util_TestDox_ResultPrinter::factory('HTML');
     //$parameters['printer'] = PHPUnit_Util_TestDox_ResultPrinter::factory('Text');
     PHPUnit_TextUI_TestRunner::run(self::suite(), $parameters);
 }
 /**
  * Runs the test methods of this class.
  *
  * @return void
  * @static
  * @since  1.7.1
  */
 public static function main()
 {
     include_once "PHPUnit/TextUI/TestRunner.php";
     $dir = dirname(__FILE__);
     $suite = new PHPUnit_Framework_TestSuite('PEAR_Info API test suite');
     $suite->addTestSuite(new PEAR_Info_TestSuite_Standard($dir));
     PHPUnit_TextUI_TestRunner::run($suite);
 }
 private function run_test($class_to_test)
 {
     $class_path = $this->get_class_to_test_path($class_to_test);
     CLIOutput::writeln('Running test ' . $class_to_test);
     include_once $class_path;
     $class = new ReflectionClass($class_to_test);
     PHPUnit_TextUI_TestRunner::run($class);
     CLIOutput::writeln();
 }
Esempio n. 27
0
 public function test($aTestSuite)
 {
     $test_suites = new PHPUnit_Framework_TestSuite();
     foreach ($aTestSuite as $sTestSuite) {
         $test_suites->addTestSuite($sTestSuite);
     }
     $arguments = array();
     //$arguments['testdoxHTMLFile'] = PHPFOX_DIR . 'module/unittest/include/service/test/socialad/results.html';
     PHPUnit_TextUI_TestRunner::run($test_suites, $arguments);
 }
Esempio n. 28
0
 public static function main()
 {
     // Run buffered tests as a separate suite first
     ob_start();
     PHPUnit_TextUI_TestRunner::run(self::suiteBuffered());
     if (ob_get_level()) {
         ob_end_flush();
     }
     PHPUnit_TextUI_TestRunner::run(self::suite());
 }
Esempio n. 29
0
 /**
  * Main entry point for running the suite.
  */
 public static function main($package = null, $file = null)
 {
     if ($package) {
         self::$_package = $package;
     }
     if ($file) {
         self::$_file = $file;
     }
     PHPUnit_TextUI_TestRunner::run(self::suite());
 }
Esempio n. 30
0
 /**
  * Main entry point for running the suite.
  *
  * @return boolean
  */
 public function run()
 {
     $old_dir = getcwd();
     chdir($this->_dir);
     $old_error = error_reporting();
     $suite = $this->suite();
     $result = PHPUnit_TextUI_TestRunner::run($suite);
     error_reporting($old_error);
     chdir($old_dir);
     return $result;
 }