Browse Source

removed TestCase and WebTestCase.

tags/2.0.0-alpha
Qiang Xue 11 years ago
parent
commit
1c24b3e0d8
  1. 3
      build/controllers/ClassmapController.php
  2. 13
      framework/yii/classes.php
  3. 25
      framework/yii/test/TestCase.php
  4. 25
      framework/yii/test/WebTestCase.php
  5. 7
      tests/unit/TestCase.php
  6. 2
      tests/unit/framework/base/ExceptionTest.php
  7. 2
      tests/unit/framework/helpers/ArrayHelperTest.php
  8. 2
      tests/unit/framework/helpers/FileHelperTest.php
  9. 2
      tests/unit/framework/helpers/JsonTest.php
  10. 4
      tests/unit/framework/helpers/StringHelperTest.php
  11. 4
      tests/unit/framework/helpers/VarDumperTest.php

3
build/controllers/ClassmapController.php

@ -46,10 +46,7 @@ class ClassmapController extends Controller
'except' => [
'Yii.php',
'BaseYii.php',
'/debug/',
'/console/',
'/test/',
'/gii/',
],
];
$files = FileHelper::findFiles($root, $options);

13
framework/yii/classes.php

@ -76,8 +76,12 @@ return [
'yii\data\Pagination' => YII_PATH . '/data/Pagination.php',
'yii\data\Sort' => YII_PATH . '/data/Sort.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\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\Command' => YII_PATH . '/db/Command.php',
'yii\db\Connection' => YII_PATH . '/db/Connection.php',
@ -87,6 +91,8 @@ return [
'yii\db\Migration' => YII_PATH . '/db/Migration.php',
'yii\db\Query' => YII_PATH . '/db/Query.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\StaleObjectException' => YII_PATH . '/db/StaleObjectException.php',
'yii\db\TableSchema' => YII_PATH . '/db/TableSchema.php',
@ -149,6 +155,10 @@ return [
'yii\log\FileTarget' => YII_PATH . '/log/FileTarget.php',
'yii\log\Logger' => YII_PATH . '/log/Logger.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\FileMutex' => YII_PATH . '/mutex/FileMutex.php',
'yii\mutex\Mutex' => YII_PATH . '/mutex/Mutex.php',
@ -161,6 +171,8 @@ return [
'yii\redis\Connection' => YII_PATH . '/redis/Connection.php',
'yii\redis\Transaction' => YII_PATH . '/redis/Transaction.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\CompareValidator' => YII_PATH . '/validators/CompareValidator.php',
'yii\validators\DateValidator' => YII_PATH . '/validators/DateValidator.php',
@ -169,6 +181,7 @@ return [
'yii\validators\ExistValidator' => YII_PATH . '/validators/ExistValidator.php',
'yii\validators\FileValidator' => YII_PATH . '/validators/FileValidator.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\NumberValidator' => YII_PATH . '/validators/NumberValidator.php',
'yii\validators\PunycodeAsset' => YII_PATH . '/validators/PunycodeAsset.php',

25
framework/yii/test/TestCase.php

@ -1,25 +0,0 @@
<?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
{
}

25
framework/yii/test/WebTestCase.php

@ -1,25 +0,0 @@
<?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
{
}

7
tests/unit/TestCase.php

@ -2,10 +2,15 @@
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.
*/
abstract class TestCase extends \yii\test\TestCase
abstract class TestCase extends \PHPUnit_Framework_TestCase
{
public static $params;

2
tests/unit/framework/base/ExceptionTest.php

@ -1,7 +1,7 @@
<?php
namespace yiiunit\framework\base;
use yii\test\TestCase;
use yiiunit\TestCase;
use yii\base\UserException;
use yii\base\InvalidCallException;

2
tests/unit/framework/helpers/ArrayHelperTest.php

@ -4,7 +4,7 @@ namespace yiiunit\framework\helpers;
use yii\base\Object;
use yii\helpers\ArrayHelper;
use yii\test\TestCase;
use yiiunit\TestCase;
use yii\data\Sort;
class Post1

2
tests/unit/framework/helpers/FileHelperTest.php

@ -1,7 +1,7 @@
<?php
use yii\helpers\FileHelper;
use yii\test\TestCase;
use yiiunit\TestCase;
/**
* Unit test for [[yii\helpers\FileHelper]]

2
tests/unit/framework/helpers/JsonTest.php

@ -4,7 +4,7 @@
namespace yiiunit\framework\helpers;
use yii\helpers\Json;
use yii\test\TestCase;
use yiiunit\TestCase;
use yii\web\JsExpression;
/**

4
tests/unit/framework/helpers/StringHelperTest.php

@ -1,8 +1,8 @@
<?php
namespace yiiunit\framework\helpers;
use \yii\helpers\StringHelper as StringHelper;
use yii\test\TestCase;
use yii\helpers\StringHelper;
use yiiunit\TestCase;
/**
* StringHelperTest

4
tests/unit/framework/helpers/VarDumperTest.php

@ -1,8 +1,8 @@
<?php
namespace yiiunit\framework\helpers;
use \yii\helpers\VarDumper;
use yii\test\TestCase;
use yii\helpers\VarDumper;
use yiiunit\TestCase;
/**
* @group helpers

Loading…
Cancel
Save