mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-08 17:07:33 +08:00
33 lines
667 B
PHP
33 lines
667 B
PHP
<?php
|
|
|
|
namespace yiiunit\framework\base;
|
|
|
|
use Yii;
|
|
use yii\log\Dispatcher;
|
|
use yiiunit\data\ar\Cat;
|
|
use yiiunit\data\ar\Order;
|
|
use yiiunit\data\ar\Type;
|
|
use yiiunit\TestCase;
|
|
|
|
class ApplicationTest extends TestCase
|
|
{
|
|
public function testContainerSettingsAffectBootstrap()
|
|
{
|
|
$this->mockApplication([
|
|
'container' => [
|
|
'definitions' => [
|
|
Dispatcher::className() => DispatcherMock::className()
|
|
]
|
|
],
|
|
'bootstrap' => ['log']
|
|
]);
|
|
|
|
$this->assertInstanceOf(DispatcherMock::className(), Yii::$app->log);
|
|
}
|
|
}
|
|
|
|
class DispatcherMock extends Dispatcher
|
|
{
|
|
|
|
}
|