When calling a controller upon handling a request, YII does the following.
Creates a controller instance based on a route. The route should contain the controller ID and the action ID. It may also contain additional GET variables. All these must be concatenated together with slashes.
1. If the first segment is found in controllerMap, the corresponding controller configuration will be used to create the controller;
2. If the first segment is found to be a module ID, the corresponding module will be used to create the controller;
3.Otherwise, it will search under the controllerPath to create the corresponding controller. For example, if the route is "admin/user/create", then the controller will be created using the class file "protected/controllers/admin/UserController.php".
I presume that you have not declared the controllerMap proprty in main configuration file.
In our case, when we are calling,
as we have admin as a module, it is going to look for TestController inside the controllers folder of the
admin module for action index.That is why it throws the error.
Then it is appropriate to call
If you still want admin/test to point to admin/admin/test,
we can add a rule like this.