Files
yii2/tests/framework/base/ApplicationTest.php
2017-05-01 20:26:15 +02:00

33 lines
612 B
PHP

<?php
namespace yiiunit\framework\base;
use Yii;
use yii\log\Dispatcher;
use yiiunit\TestCase;
/**
* @group base
*/
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
{
}