CTestCase.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * This file contains the CTestCase class.
  4. *
  5. * @author Qiang Xue <qiang.xue@gmail.com>
  6. * @link http://www.yiiframework.com/
  7. * @copyright 2008-2013 Yii Software LLC
  8. * @license http://www.yiiframework.com/license/
  9. */
  10. if(!class_exists('PHPUnit_Runner_Version')) {
  11. require_once('PHPUnit/Runner/Version.php');
  12. require_once('PHPUnit/Util/Filesystem.php'); // workaround for PHPUnit <= 3.6.11
  13. spl_autoload_unregister(array('YiiBase','autoload'));
  14. require_once('PHPUnit/Autoload.php');
  15. spl_autoload_register(array('YiiBase','autoload')); // put yii's autoloader at the end
  16. if (in_array('phpunit_autoload', spl_autoload_functions())) { // PHPUnit >= 3.7 'phpunit_autoload' was obsoleted
  17. spl_autoload_unregister('phpunit_autoload');
  18. Yii::registerAutoloader('phpunit_autoload');
  19. }
  20. }
  21. /**
  22. * CTestCase is the base class for all test case classes.
  23. *
  24. * @author Qiang Xue <qiang.xue@gmail.com>
  25. * @package system.test
  26. * @since 1.1
  27. */
  28. abstract class CTestCase extends PHPUnit_Framework_TestCase
  29. {
  30. }