Commit e6f9aef3 by Qiang Xue

fixed test break.

parent cc636805
<?php <?php
namespace yiiunit; namespace yiiunit;
use yii\helpers\ArrayHelper;
/** /**
* This is the base class for all yii framework unit tests. * This is the base class for all yii framework unit tests.
...@@ -47,7 +48,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase ...@@ -47,7 +48,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
]; ];
$defaultConfig['vendorPath'] = dirname(dirname(__DIR__)) . '/vendor'; $defaultConfig['vendorPath'] = dirname(dirname(__DIR__)) . '/vendor';
new $appClass(array_merge($defaultConfig, $config)); new $appClass(ArrayHelper::merge($defaultConfig, $config));
} }
/** /**
......
...@@ -11,7 +11,15 @@ class OAuth1Test extends TestCase ...@@ -11,7 +11,15 @@ class OAuth1Test extends TestCase
{ {
protected function setUp() protected function setUp()
{ {
$this->mockApplication([], '\yii\web\Application'); $config = [
'components' => [
'request' => [
'hostInfo' => 'http://testdomain.com',
'scriptUrl' => '/index.php',
],
]
];
$this->mockApplication($config, '\yii\web\Application');
} }
/** /**
......
...@@ -9,7 +9,15 @@ class OAuth2Test extends TestCase ...@@ -9,7 +9,15 @@ class OAuth2Test extends TestCase
{ {
protected function setUp() protected function setUp()
{ {
$this->mockApplication([], '\yii\web\Application'); $config = [
'components' => [
'request' => [
'hostInfo' => 'http://testdomain.com',
'scriptUrl' => '/index.php',
],
]
];
$this->mockApplication($config, '\yii\web\Application');
} }
// Tests : // Tests :
......
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