|
|
|
@ -127,25 +127,25 @@ class ModuleTest extends TestCase
|
|
|
|
|
$module->controllerNamespace = 'yiiunit\framework\base'; |
|
|
|
|
|
|
|
|
|
$route = 'module-test'; |
|
|
|
|
$this->assertInstanceOf(ModuleTestController::className(), $module->createControllerByID($route)); |
|
|
|
|
$this->assertInstanceOf(ModuleTestController::class, $module->createControllerByID($route)); |
|
|
|
|
|
|
|
|
|
$route = 'module-test-'; |
|
|
|
|
$this->assertNotInstanceOf(ModuleTestController::className(), $module->createControllerByID($route)); |
|
|
|
|
$this->assertNotInstanceOf(ModuleTestController::class, $module->createControllerByID($route)); |
|
|
|
|
|
|
|
|
|
$route = '-module-test'; |
|
|
|
|
$this->assertNotInstanceOf(ModuleTestController::className(), $module->createControllerByID($route)); |
|
|
|
|
$this->assertNotInstanceOf(ModuleTestController::class, $module->createControllerByID($route)); |
|
|
|
|
|
|
|
|
|
$route = 'very-complex-name-test'; |
|
|
|
|
$this->assertInstanceOf(VeryComplexNameTestController::className(), $module->createControllerByID($route)); |
|
|
|
|
$this->assertInstanceOf(VeryComplexNameTestController::class, $module->createControllerByID($route)); |
|
|
|
|
|
|
|
|
|
$route = 'very-complex-name-test--'; |
|
|
|
|
$this->assertNotInstanceOf(VeryComplexNameTestController::className(), $module->createControllerByID($route)); |
|
|
|
|
$this->assertNotInstanceOf(VeryComplexNameTestController::class, $module->createControllerByID($route)); |
|
|
|
|
|
|
|
|
|
$route = '--very-complex-name-test'; |
|
|
|
|
$this->assertNotInstanceOf(VeryComplexNameTestController::className(), $module->createControllerByID($route)); |
|
|
|
|
$this->assertNotInstanceOf(VeryComplexNameTestController::class, $module->createControllerByID($route)); |
|
|
|
|
|
|
|
|
|
$route = 'very---complex---name---test'; |
|
|
|
|
$this->assertNotInstanceOf(VeryComplexNameTestController::className(), $module->createControllerByID($route)); |
|
|
|
|
$this->assertNotInstanceOf(VeryComplexNameTestController::class, $module->createControllerByID($route)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|