Files
yii/tests/bootstrap.php
Carsten Brandt 4c1ef3973f ignore deprecation errors in PHP 7.1 and above
Yii 1.1. is not going to be adjusted to work on PHP 8.
2016-12-05 16:38:20 +01:00

35 lines
1.0 KiB
PHP

<?php
if (PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 1) {
// skip deprecation errors in PHP 7.1 and above
error_reporting(E_ALL & ~E_DEPRECATED);
}
defined('YII_ENABLE_EXCEPTION_HANDLER') or define('YII_ENABLE_EXCEPTION_HANDLER',false);
defined('YII_ENABLE_ERROR_HANDLER') or define('YII_ENABLE_ERROR_HANDLER',false);
defined('YII_DEBUG') or define('YII_DEBUG',true);
$_SERVER['SCRIPT_NAME']='/'.basename(__FILE__);
$_SERVER['SCRIPT_FILENAME']=__FILE__;
require_once(dirname(__FILE__).'/../framework/yii.php');
require_once(dirname(__FILE__).'/TestApplication.php');
// Support PHPUnit <=3.7 and >=3.8
if (@include_once('PHPUnit/Framework/TestCase.php')===false) // <= 3.7
require_once('src/Framework/TestCase.php'); // >= 3.8
// make sure non existing PHPUnit classes do not break with Yii autoloader
Yii::$enableIncludePath = false;
Yii::setPathOfAlias('tests', dirname(__FILE__));
Yii::import('tests.*');
class CTestCase extends PHPUnit_Framework_TestCase
{
}
class CActiveRecordTestCase extends CTestCase
{
}
new TestApplication();