Files
yii2/tests/framework/base/ModuleTest.php
2016-09-26 22:24:11 +02:00

29 lines
616 B
PHP

<?php
namespace yiiunit\framework\base;
use yiiunit\TestCase;
/**
* @group base
*/
class ModuleTest extends TestCase
{
protected function setUp()
{
parent::setUp();
$this->mockApplication();
}
public function testControllerPath()
{
$module = new TestModule('test');
$this->assertEquals('yiiunit\framework\base\controllers', $module->controllerNamespace);
$this->assertEquals(__DIR__ . DIRECTORY_SEPARATOR . 'controllers', str_replace(['/','\\'], DIRECTORY_SEPARATOR , $module->controllerPath));
}
}
class TestModule extends \yii\base\Module
{
}