{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2-codeception/issues/35","repository_url":"https://api.github.com/repos/yiisoft/yii2-codeception","labels_url":"https://api.github.com/repos/yiisoft/yii2-codeception/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2-codeception/issues/35/comments","events_url":"https://api.github.com/repos/yiisoft/yii2-codeception/issues/35/events","html_url":"https://github.com/yiisoft/yii2-codeception/issues/35","id":185406483,"number":35,"title":"Codeception\\Test\\Unit not found","user":{"login":"yii-bot","id":13490354,"avatar_url":"https://avatars.githubusercontent.com/u/13490354?v=3","gravatar_id":"","url":"https://api.github.com/users/yii-bot","html_url":"https://github.com/yii-bot","followers_url":"https://api.github.com/users/yii-bot/followers","following_url":"https://api.github.com/users/yii-bot/following{/other_user}","gists_url":"https://api.github.com/users/yii-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/yii-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yii-bot/subscriptions","organizations_url":"https://api.github.com/users/yii-bot/orgs","repos_url":"https://api.github.com/users/yii-bot/repos","events_url":"https://api.github.com/users/yii-bot/events{/privacy}","received_events_url":"https://api.github.com/users/yii-bot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2-codeception/labels/ext:codeception","name":"ext:codeception","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-26T14:16:29Z","updated_at":"2016-10-26T15:23:40Z","closed_at":null,"body":"This issue has originally been reported by @jonny7 at https://github.com/yiisoft/yii2/issues/12851.\nMoved here by @dynasource.\n\n-----\n\nI am having some problems with Codeception using Yii2. I just upgraded to Yii 2.0.10 and have been using this [guide](http://codeception.com/for/yii)\r\n\r\nI am getting the error: `Codeception\\Test\\Unit not found in vendor\\codeception\\base\\shim.php`. If I comment this class out, the next one fails which is:\r\n\r\nnamespace Codeception\\Module {\r\n\r\nclass Symfony2 extends Symfony {\r\n}\r\nThis is what I've done: I created a file **test.php** and put it in my config folder:\r\n\r\n```\r\n<?php\r\n// config/test.php\r\n$config =  yii\\helpers\\ArrayHelper::merge(\r\nrequire(__DIR__ . '/main.php'),\r\nrequire(__DIR__ . '/main-local.php'),\r\n[\r\n'id' => 'app-tests',\r\n'components' => [\r\n    'db1' => require(__DIR__ . '/db.php'),\r\n]\r\n]\r\n);\r\nreturn $config;\r\n```\r\n**codeception.yaml**\r\n\r\n```\r\nactor: Tester\r\npaths:\r\ntests: tests\r\nlog: tests/_output\r\ndata: tests/_data\r\nhelpers: tests/_support\r\nsettings:\r\nbootstrap: _bootstrap.php\r\nmemory_limit: 1024M\r\ncolors: true\r\nmodules:\r\nconfig:\r\n    Yii2:\r\n        configFile: 'config/test.php'\r\n```\r\n**unit.suite.yml**\r\n\r\n```\r\nclass_name: UnitTester\r\nmodules:\r\nenabled:\r\n  - Asserts\r\n  - Yii2:\r\n        part: [orm, email]\r\n```\r\nI'm completely new to Codeception, so not sure what I've done wrong. I had Codecepion installed in my v.2.0.9 but not really got it going, so I don't know if I've got conflicting thngs or anything like that going on. I'd be happy to start a fresh if there is a way through composer to re-set up the tests folder + Codeception. Or whatever people think is best.\r\n\r\n\r\n### Additional info\r\n\r\n| Q                | A\r\n| ---------------- | ---\r\n| Yii version      | 2.0.10\r\n| PHP version      | 5.6.24\r\n| Operating system | Windows 7\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2-codeception/issues/comments/256381369","html_url":"https://github.com/yiisoft/yii2-codeception/issues/35#issuecomment-256381369","issue_url":"https://api.github.com/repos/yiisoft/yii2-codeception/issues/35","id":256381369,"user":{"login":"samdark","id":47294,"avatar_url":"https://avatars.githubusercontent.com/u/47294?v=3","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T15:23:40Z","updated_at":"2016-10-26T15:23:40Z","body":"Yes."}}
{"actor":{"display_login":"samdark"}}