Function 'phpunit_autoload' not found

1698 단어 Web
Function'phpunit_autoload'not found (function'phpunit_autoload'not found or invalid function name)

해결 방법은 CTestCase를 수정합니다.php는 다음과 같습니다.
/**
* This file contains the CTestCase class.
*
* @author Qiang Xue
* @link http://www.yiiframework.com/
* @copyright Copyright © 2008-2011 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
require_once('PHPUnit/Runner/Version.php');
require_once('PHPUnit/Util/Filesystem.php');//workaround for PHPUnit <= 3.6.11
require_once('PHPUnit/Autoload.php');
if (in_array('phpunit_autoload', spl_autoload_functions())) {//PHPUnit >= 3.7 'phpunit_alutoload' was obsoleted
spl_autoload_unregister('phpunit_autoload');
Yii::registerAutoloader('phpunit_autoload');
}
/**
* CTestCase is the base class for all test case classes.
*
* @author Qiang Xue
* @version $Id$
* @package system.test
* @since 1.1
*/
abstract class CTestCase extends PHPUnit_Framework_TestCase
{
}

좋은 웹페이지 즐겨찾기