mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Updating the skel and app test.php's to not make a global variable for the dispatcher. This dramatically improves the performance of the web test runner.
This commit is contained in:
parent
f46241a6e7
commit
4622ec44c2
3 changed files with 17 additions and 9 deletions
|
@ -90,5 +90,4 @@ if (Configure::read('debug') < 1) {
|
|||
|
||||
require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php';
|
||||
|
||||
$Dispatcher = new CakeTestSuiteDispatcher();
|
||||
$Dispatcher->dispatch();
|
||||
CakeTestSuiteDispatcher::run();
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
|
||||
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The Open Group Test Suite License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://book.cakephp.org/view/1196/Testing
|
||||
* @package cake
|
||||
* @subpackage cake.cake.tests.libs
|
||||
* @subpackage cake.app.webroot
|
||||
* @since CakePHP(tm) v 1.2.0.4433
|
||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
|
@ -85,10 +85,9 @@ if (isset($corePath[0])) {
|
|||
}
|
||||
|
||||
if (Configure::read('debug') < 1) {
|
||||
die(__('Debug setting does not allow access to this url.'));
|
||||
die(__('Debug setting does not allow access to this url.', true));
|
||||
}
|
||||
|
||||
require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php';
|
||||
|
||||
$Dispatcher = new CakeTestSuiteDispatcher();
|
||||
$Dispatcher->dispatch();
|
||||
CakeTestSuiteDispatcher::run();
|
||||
|
|
|
@ -113,6 +113,16 @@ class CakeTestSuiteDispatcher {
|
|||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Static method to initialize the test runner, keeps global space clean
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function run() {
|
||||
$dispatcher = new CakeTestSuiteDispatcher();
|
||||
$dispatcher->dispatch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that PHPUnit is installed. Will exit if it doesn't
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue