|
|
@ -4,15 +4,13 @@ namespace yiiunit\framework\helpers; |
|
|
|
|
|
|
|
|
|
|
|
use Yii; |
|
|
|
use Yii; |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\web\Application; |
|
|
|
use yiiunit\TestCase; |
|
|
|
|
|
|
|
|
|
|
|
class HtmlTest extends \yii\test\TestCase |
|
|
|
class HtmlTest extends TestCase |
|
|
|
{ |
|
|
|
{ |
|
|
|
public function setUp() |
|
|
|
public function setUp() |
|
|
|
{ |
|
|
|
{ |
|
|
|
new Application(array( |
|
|
|
$this->requireApp(array( |
|
|
|
'id' => 'test', |
|
|
|
|
|
|
|
'basePath' => '@yiiunit/runtime', |
|
|
|
|
|
|
|
'components' => array( |
|
|
|
'components' => array( |
|
|
|
'request' => array( |
|
|
|
'request' => array( |
|
|
|
'class' => 'yii\web\Request', |
|
|
|
'class' => 'yii\web\Request', |
|
|
@ -30,11 +28,6 @@ class HtmlTest extends \yii\test\TestCase |
|
|
|
$this->assertEquals($expected, $actual); |
|
|
|
$this->assertEquals($expected, $actual); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function tearDown() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Yii::$app = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function testEncode() |
|
|
|
public function testEncode() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->assertEquals("a<>&"'", Html::encode("a<>&\"'")); |
|
|
|
$this->assertEquals("a<>&"'", Html::encode("a<>&\"'")); |
|
|
|