{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/10345","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/10345/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/10345/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/10345/events","html_url":"https://github.com/yiisoft/yii2/issues/10345","id":120799851,"number":10345,"title":"Getting Error: Unknown command \"test\", while running the console command.","user":{"login":"chaitenyay","id":2189282,"avatar_url":"https://avatars.githubusercontent.com/u/2189282?v=3","gravatar_id":"","url":"https://api.github.com/users/chaitenyay","html_url":"https://github.com/chaitenyay","followers_url":"https://api.github.com/users/chaitenyay/followers","following_url":"https://api.github.com/users/chaitenyay/following{/other_user}","gists_url":"https://api.github.com/users/chaitenyay/gists{/gist_id}","starred_url":"https://api.github.com/users/chaitenyay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaitenyay/subscriptions","organizations_url":"https://api.github.com/users/chaitenyay/orgs","repos_url":"https://api.github.com/users/chaitenyay/repos","events_url":"https://api.github.com/users/chaitenyay/events{/privacy}","received_events_url":"https://api.github.com/users/chaitenyay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-07T15:36:28Z","updated_at":"2015-12-08T08:54:08Z","closed_at":null,"body":"I am trying to create the console command and follow the instruction given in doc.\r\n\r\nI created a file into console/controllers/TestController.php\r\n\r\n<?php\r\nnamespace console\\controllers;\r\n\r\nuse yii\\console\\Controller;\r\nuse yii\\helpers\\Console;\r\n\r\nclass TestController extends Controller\r\n{\r\n   public function actionIndex()\r\n    {\r\n        echo \"Hello world.\";        \r\n    }\r\n}\r\n\r\nWhile  I am running the following commad into cli, getting below error message.\r\n\r\n$ yii test\r\nError: Unknown command \"test\".\r\n\r\nPlease let me know, what I missed.\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/162819185","html_url":"https://github.com/yiisoft/yii2/issues/10345#issuecomment-162819185","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/10345","id":162819185,"user":{"login":"chaitenyay","id":2189282,"avatar_url":"https://avatars.githubusercontent.com/u/2189282?v=3","gravatar_id":"","url":"https://api.github.com/users/chaitenyay","html_url":"https://github.com/chaitenyay","followers_url":"https://api.github.com/users/chaitenyay/followers","following_url":"https://api.github.com/users/chaitenyay/following{/other_user}","gists_url":"https://api.github.com/users/chaitenyay/gists{/gist_id}","starred_url":"https://api.github.com/users/chaitenyay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaitenyay/subscriptions","organizations_url":"https://api.github.com/users/chaitenyay/orgs","repos_url":"https://api.github.com/users/chaitenyay/repos","events_url":"https://api.github.com/users/chaitenyay/events{/privacy}","received_events_url":"https://api.github.com/users/chaitenyay/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T08:54:08Z","updated_at":"2015-12-08T08:54:08Z","body":"Thanks rugabarbo for the prompt reply.\r\n\r\n"}}