Files
yii2/tests/framework/base/ApplicationTest.php
2016-12-07 00:21:00 +01:00

36 lines
690 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;
/**
* @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
{
}