mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-15 14:50:56 +08:00
29 lines
616 B
PHP
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
|
|
{
|
|
|
|
} |