Commit 1c24b3e0 by Qiang Xue

removed TestCase and WebTestCase.

parent 8106cded
...@@ -46,10 +46,7 @@ class ClassmapController extends Controller ...@@ -46,10 +46,7 @@ class ClassmapController extends Controller
'except' => [ 'except' => [
'Yii.php', 'Yii.php',
'BaseYii.php', 'BaseYii.php',
'/debug/',
'/console/', '/console/',
'/test/',
'/gii/',
], ],
]; ];
$files = FileHelper::findFiles($root, $options); $files = FileHelper::findFiles($root, $options);
......
...@@ -76,8 +76,12 @@ return [ ...@@ -76,8 +76,12 @@ return [
'yii\data\Pagination' => YII_PATH . '/data/Pagination.php', 'yii\data\Pagination' => YII_PATH . '/data/Pagination.php',
'yii\data\Sort' => YII_PATH . '/data/Sort.php', 'yii\data\Sort' => YII_PATH . '/data/Sort.php',
'yii\db\ActiveQuery' => YII_PATH . '/db/ActiveQuery.php', 'yii\db\ActiveQuery' => YII_PATH . '/db/ActiveQuery.php',
'yii\db\ActiveQueryInterface' => YII_PATH . '/db/ActiveQueryInterface.php',
'yii\db\ActiveQueryTrait' => YII_PATH . '/db/ActiveQueryTrait.php',
'yii\db\ActiveRecord' => YII_PATH . '/db/ActiveRecord.php', 'yii\db\ActiveRecord' => YII_PATH . '/db/ActiveRecord.php',
'yii\db\ActiveRelation' => YII_PATH . '/db/ActiveRelation.php', 'yii\db\ActiveRelation' => YII_PATH . '/db/ActiveRelation.php',
'yii\db\ActiveRelationInterface' => YII_PATH . '/db/ActiveRelationInterface.php',
'yii\db\ActiveRelationTrait' => YII_PATH . '/db/ActiveRelationTrait.php',
'yii\db\ColumnSchema' => YII_PATH . '/db/ColumnSchema.php', 'yii\db\ColumnSchema' => YII_PATH . '/db/ColumnSchema.php',
'yii\db\Command' => YII_PATH . '/db/Command.php', 'yii\db\Command' => YII_PATH . '/db/Command.php',
'yii\db\Connection' => YII_PATH . '/db/Connection.php', 'yii\db\Connection' => YII_PATH . '/db/Connection.php',
...@@ -87,6 +91,8 @@ return [ ...@@ -87,6 +91,8 @@ return [
'yii\db\Migration' => YII_PATH . '/db/Migration.php', 'yii\db\Migration' => YII_PATH . '/db/Migration.php',
'yii\db\Query' => YII_PATH . '/db/Query.php', 'yii\db\Query' => YII_PATH . '/db/Query.php',
'yii\db\QueryBuilder' => YII_PATH . '/db/QueryBuilder.php', 'yii\db\QueryBuilder' => YII_PATH . '/db/QueryBuilder.php',
'yii\db\QueryInterface' => YII_PATH . '/db/QueryInterface.php',
'yii\db\QueryTrait' => YII_PATH . '/db/QueryTrait.php',
'yii\db\Schema' => YII_PATH . '/db/Schema.php', 'yii\db\Schema' => YII_PATH . '/db/Schema.php',
'yii\db\StaleObjectException' => YII_PATH . '/db/StaleObjectException.php', 'yii\db\StaleObjectException' => YII_PATH . '/db/StaleObjectException.php',
'yii\db\TableSchema' => YII_PATH . '/db/TableSchema.php', 'yii\db\TableSchema' => YII_PATH . '/db/TableSchema.php',
...@@ -149,6 +155,10 @@ return [ ...@@ -149,6 +155,10 @@ return [
'yii\log\FileTarget' => YII_PATH . '/log/FileTarget.php', 'yii\log\FileTarget' => YII_PATH . '/log/FileTarget.php',
'yii\log\Logger' => YII_PATH . '/log/Logger.php', 'yii\log\Logger' => YII_PATH . '/log/Logger.php',
'yii\log\Target' => YII_PATH . '/log/Target.php', 'yii\log\Target' => YII_PATH . '/log/Target.php',
'yii\mail\BaseMailer' => YII_PATH . '/mail/BaseMailer.php',
'yii\mail\BaseMessage' => YII_PATH . '/mail/BaseMessage.php',
'yii\mail\MailerInterface' => YII_PATH . '/mail/MailerInterface.php',
'yii\mail\MessageInterface' => YII_PATH . '/mail/MessageInterface.php',
'yii\mutex\DbMutex' => YII_PATH . '/mutex/DbMutex.php', 'yii\mutex\DbMutex' => YII_PATH . '/mutex/DbMutex.php',
'yii\mutex\FileMutex' => YII_PATH . '/mutex/FileMutex.php', 'yii\mutex\FileMutex' => YII_PATH . '/mutex/FileMutex.php',
'yii\mutex\Mutex' => YII_PATH . '/mutex/Mutex.php', 'yii\mutex\Mutex' => YII_PATH . '/mutex/Mutex.php',
...@@ -161,6 +171,8 @@ return [ ...@@ -161,6 +171,8 @@ return [
'yii\redis\Connection' => YII_PATH . '/redis/Connection.php', 'yii\redis\Connection' => YII_PATH . '/redis/Connection.php',
'yii\redis\Transaction' => YII_PATH . '/redis/Transaction.php', 'yii\redis\Transaction' => YII_PATH . '/redis/Transaction.php',
'yii\requirements\YiiRequirementChecker' => YII_PATH . '/requirements/YiiRequirementChecker.php', 'yii\requirements\YiiRequirementChecker' => YII_PATH . '/requirements/YiiRequirementChecker.php',
'yii\test\DbFixtureManager' => YII_PATH . '/test/DbFixtureManager.php',
'yii\test\DbTestTrait' => YII_PATH . '/test/DbTestTrait.php',
'yii\validators\BooleanValidator' => YII_PATH . '/validators/BooleanValidator.php', 'yii\validators\BooleanValidator' => YII_PATH . '/validators/BooleanValidator.php',
'yii\validators\CompareValidator' => YII_PATH . '/validators/CompareValidator.php', 'yii\validators\CompareValidator' => YII_PATH . '/validators/CompareValidator.php',
'yii\validators\DateValidator' => YII_PATH . '/validators/DateValidator.php', 'yii\validators\DateValidator' => YII_PATH . '/validators/DateValidator.php',
...@@ -169,6 +181,7 @@ return [ ...@@ -169,6 +181,7 @@ return [
'yii\validators\ExistValidator' => YII_PATH . '/validators/ExistValidator.php', 'yii\validators\ExistValidator' => YII_PATH . '/validators/ExistValidator.php',
'yii\validators\FileValidator' => YII_PATH . '/validators/FileValidator.php', 'yii\validators\FileValidator' => YII_PATH . '/validators/FileValidator.php',
'yii\validators\FilterValidator' => YII_PATH . '/validators/FilterValidator.php', 'yii\validators\FilterValidator' => YII_PATH . '/validators/FilterValidator.php',
'yii\validators\ImageValidator' => YII_PATH . '/validators/ImageValidator.php',
'yii\validators\InlineValidator' => YII_PATH . '/validators/InlineValidator.php', 'yii\validators\InlineValidator' => YII_PATH . '/validators/InlineValidator.php',
'yii\validators\NumberValidator' => YII_PATH . '/validators/NumberValidator.php', 'yii\validators\NumberValidator' => YII_PATH . '/validators/NumberValidator.php',
'yii\validators\PunycodeAsset' => YII_PATH . '/validators/PunycodeAsset.php', 'yii\validators\PunycodeAsset' => YII_PATH . '/validators/PunycodeAsset.php',
......
<?php
/**
* TestCase class.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\test;
require_once('PHPUnit/Runner/Version.php');
spl_autoload_unregister(['Yii', 'autoload']);
require_once('PHPUnit/Autoload.php');
spl_autoload_register(['Yii', 'autoload']); // put yii's autoloader at the end
/**
* TestCase is the base class for all test case classes.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
abstract class TestCase extends \PHPUnit_Framework_TestCase
{
}
<?php
/**
* WebTestCase class.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\test;
require_once('PHPUnit/Runner/Version.php');
spl_autoload_unregister(['Yii','autoload']);
require_once('PHPUnit/Autoload.php');
spl_autoload_register(['Yii','autoload']); // put yii's autoloader at the end
/**
* WebTestCase is the base class for all test case classes.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
abstract class WebTestCase extends \PHPUnit_Extensions_SeleniumTestCase
{
}
...@@ -2,10 +2,15 @@ ...@@ -2,10 +2,15 @@
namespace yiiunit; namespace yiiunit;
require_once('PHPUnit/Runner/Version.php');
spl_autoload_unregister(['Yii', 'autoload']);
require_once('PHPUnit/Autoload.php');
spl_autoload_register(['Yii', 'autoload']); // put yii's autoloader at the end
/** /**
* This is the base class for all yii framework unit tests. * This is the base class for all yii framework unit tests.
*/ */
abstract class TestCase extends \yii\test\TestCase abstract class TestCase extends \PHPUnit_Framework_TestCase
{ {
public static $params; public static $params;
......
<?php <?php
namespace yiiunit\framework\base; namespace yiiunit\framework\base;
use yii\test\TestCase; use yiiunit\TestCase;
use yii\base\UserException; use yii\base\UserException;
use yii\base\InvalidCallException; use yii\base\InvalidCallException;
......
...@@ -4,7 +4,7 @@ namespace yiiunit\framework\helpers; ...@@ -4,7 +4,7 @@ namespace yiiunit\framework\helpers;
use yii\base\Object; use yii\base\Object;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
use yii\test\TestCase; use yiiunit\TestCase;
use yii\data\Sort; use yii\data\Sort;
class Post1 class Post1
......
<?php <?php
use yii\helpers\FileHelper; use yii\helpers\FileHelper;
use yii\test\TestCase; use yiiunit\TestCase;
/** /**
* Unit test for [[yii\helpers\FileHelper]] * Unit test for [[yii\helpers\FileHelper]]
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
namespace yiiunit\framework\helpers; namespace yiiunit\framework\helpers;
use yii\helpers\Json; use yii\helpers\Json;
use yii\test\TestCase; use yiiunit\TestCase;
use yii\web\JsExpression; use yii\web\JsExpression;
/** /**
......
<?php <?php
namespace yiiunit\framework\helpers; namespace yiiunit\framework\helpers;
use \yii\helpers\StringHelper as StringHelper; use yii\helpers\StringHelper;
use yii\test\TestCase; use yiiunit\TestCase;
/** /**
* StringHelperTest * StringHelperTest
......
<?php <?php
namespace yiiunit\framework\helpers; namespace yiiunit\framework\helpers;
use \yii\helpers\VarDumper; use yii\helpers\VarDumper;
use yii\test\TestCase; use yiiunit\TestCase;
/** /**
* @group helpers * @group helpers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment