7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
17 * @subpackage UnitTests
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
23 require_once dirname(__FILE__
) . DIRECTORY_SEPARATOR
. 'TestHelper.php';
25 if (!defined('PHPUnit_MAIN_METHOD')) {
26 define('PHPUnit_MAIN_METHOD', 'AllTests::main');
29 require_once 'Zend/AllTests.php';
30 require_once 'resources/AllTests.php';
35 * @subpackage UnitTests
36 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
37 * @license http://framework.zend.com/license/new-bsd New BSD License
41 public static function main()
43 $parameters = array();
45 if (TESTS_GENERATE_REPORT
&& extension_loaded('xdebug')) {
46 $parameters['reportDirectory'] = TESTS_GENERATE_REPORT_TARGET
;
49 if (defined('TESTS_ZEND_LOCALE_FORMAT_SETLOCALE') && TESTS_ZEND_LOCALE_FORMAT_SETLOCALE
) {
50 // run all tests in a special locale
51 setlocale(LC_ALL
, TESTS_ZEND_LOCALE_FORMAT_SETLOCALE
);
54 // Run buffered tests as a separate suite first
56 PHPUnit_TextUI_TestRunner
::run(self
::suiteBuffered(), $parameters);
61 PHPUnit_TextUI_TestRunner
::run(self
::suite(), $parameters);
65 * Buffered test suites
67 * These tests require no output be sent prior to running as they rely
68 * on internal PHP functions.
70 * @return PHPUnit_Framework_TestSuite
72 public static function suiteBuffered()
74 $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Buffered');
76 $suite->addTest(Zend_AllTests
::suiteBuffered());
84 * All tests except those that require output buffering.
86 * @return PHPUnit_Framework_TestSuite
88 public static function suite()
90 $suite = new PHPUnit_Framework_TestSuite('Zend Framework');
92 $suite->addTest(Zend_AllTests
::suite());
93 $suite->addTest(resources_AllTests
::suite());
99 if (PHPUnit_MAIN_METHOD
== 'AllTests::main') {