cakephp2-php8/lib/Cake/Test/bootstrap.php

30 lines
943 B
PHP
Raw Permalink Normal View History

<?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));