mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-26 08:47:19 +00:00
30 lines
943 B
PHP
30 lines
943 B
PHP
|
<?php
|
||
|
/**
|
||
|
* Bootstrap for phpunit command
|
||
|
*/
|
||
|
|
||
|
if (!defined('DS')) {
|
||
|
define('DS', DIRECTORY_SEPARATOR);
|
||
|
}
|
||
|
require_once __DIR__ . DS . 'bootstrap' . DS . 'cake_dot_php.php';
|
||
|
|
||
|
/*
|
||
|
* loading of lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
|
||
|
* In bootstrap.php, it is sufficient if the const(s) are defined outside the class of CakeTestSuiteDispatcher.php.
|
||
|
* However, when loading CakeTestSuiteDispatcher.php in the unit test, a double definition of const(s) error occurs,
|
||
|
* so load it here.
|
||
|
*/
|
||
|
App::uses('CakeTestSuiteDispatcher', 'TestSuite');
|
||
|
App::load('CakeTestSuiteDispatcher');
|
||
|
|
||
|
/*
|
||
|
* Classes that can be used without declaring App::uses()
|
||
|
*/
|
||
|
App::uses('ClassRegistry', 'Utility');
|
||
|
App::uses('CakeTestCase', 'TestSuite');
|
||
|
App::uses('CakeTestSuite', 'TestSuite');
|
||
|
App::uses('ControllerTestCase', 'TestSuite');
|
||
|
App::uses('CakeTestModel', 'TestSuite/Fixture');
|
||
|
|
||
|
set_error_handler(new \PHPUnit\Util\ErrorHandler(true, true, true, true));
|