Browse Source

test wip

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
b2b9b4f319
  1. 4
      framework/test/TestCase.php
  2. 25
      framework/test/WebTestCase.php
  3. 2
      framework/widgets/ActiveForm.php

4
framework/test/TestCase.php

@ -10,9 +10,9 @@
namespace yii\test; namespace yii\test;
require_once('PHPUnit/Runner/Version.php'); require_once('PHPUnit/Runner/Version.php');
spl_autoload_unregister(array('YiiBase','autoload')); spl_autoload_unregister(array('Yii','autoload'));
require_once('PHPUnit/Autoload.php'); require_once('PHPUnit/Autoload.php');
spl_autoload_register(array('YiiBase','autoload')); // put yii's autoloader at the end spl_autoload_register(array('Yii','autoload')); // put yii's autoloader at the end
/** /**
* TestCase is the base class for all test case classes. * TestCase is the base class for all test case classes.

25
framework/test/WebTestCase.php

@ -0,0 +1,25 @@
<?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(array('Yii','autoload'));
require_once('PHPUnit/Autoload.php');
spl_autoload_register(array('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
framework/widgets/ActiveForm.php

@ -63,7 +63,7 @@ class ActiveForm extends Widget
$models = array($models); $models = array($models);
} }
$showAll = isset($options['showAll']) && $options['showAll']); $showAll = isset($options['showAll']) && $options['showAll'];
$lines = array(); $lines = array();
/** @var $model Model */ /** @var $model Model */
foreach ($models as $model) { foreach ($models as $model) {

Loading…
Cancel
Save