Adding enclosures now treats type and length parameters as optional for Atom, but...
[zend.git] / tests / AllTests.php
blobd6eab22120c72e68ee281b852ca6c85fd1c11c02
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
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.
15 * @category Zend
16 * @package Zend
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
20 * @version $Id$
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';
32 /**
33 * @category Zend
34 * @package Zend
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
39 class AllTests
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
55 ob_start();
56 PHPUnit_TextUI_TestRunner::run(self::suiteBuffered(), $parameters);
57 if (ob_get_level()) {
58 ob_end_flush();
61 PHPUnit_TextUI_TestRunner::run(self::suite(), $parameters);
64 /**
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());
78 return $suite;
81 /**
82 * Regular suite
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());
95 return $suite;
99 if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
100 AllTests::main();