{"action":"opened","issue":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/2924","repository_url":"https://api.github.com/repos/Codeception/Codeception","labels_url":"https://api.github.com/repos/Codeception/Codeception/issues/2924/labels{/name}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/2924/comments","events_url":"https://api.github.com/repos/Codeception/Codeception/issues/2924/events","html_url":"https://github.com/Codeception/Codeception/issues/2924","id":143475584,"number":2924,"title":"Issue with dependency Injection using Yii2 framework","user":{"login":"JavaDevl","id":2939851,"avatar_url":"https://avatars.githubusercontent.com/u/2939851?v=3","gravatar_id":"","url":"https://api.github.com/users/JavaDevl","html_url":"https://github.com/JavaDevl","followers_url":"https://api.github.com/users/JavaDevl/followers","following_url":"https://api.github.com/users/JavaDevl/following{/other_user}","gists_url":"https://api.github.com/users/JavaDevl/gists{/gist_id}","starred_url":"https://api.github.com/users/JavaDevl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JavaDevl/subscriptions","organizations_url":"https://api.github.com/users/JavaDevl/orgs","repos_url":"https://api.github.com/users/JavaDevl/repos","events_url":"https://api.github.com/users/JavaDevl/events{/privacy}","received_events_url":"https://api.github.com/users/JavaDevl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-25T10:46:21Z","updated_at":"2016-03-25T10:46:21Z","closed_at":null,"body":"I am receiving this error :\r\n\r\n`  [yii\\base\\ErrorException] Argument 1 passed to tests\\codeception\\backend\\tostCest::tryToTest() must be an instance of tests\\codeception\\backend\\AcceptanceTester\\AdSteps, instance of tests\\codeception\\backend\\AcceptanceTester given  `\r\n\r\nafter Creating a new StepObject  and trying to use it in my Cest class as a dependency injection element:\r\n\r\nCestClass:\r\n\r\n`namespace tests\\codeception\\backend;\r\nuse tests\\codeception\\backend\\AcceptanceTester;\r\n\r\nclass tostCest\r\n{\r\n    // tests\r\n    public function tryToTest(AcceptanceTester\\AdSteps $I,$scenario)\r\n    {\r\n        $I->loginAsAdmin();\r\n        $I->wantTo(\"Hey you\");\r\n    }\r\n}\r\n`\r\n\r\nStepObject:\r\n\r\n`namespace tests\\codeception\\backend\\AcceptanceTester;\r\nclass AdSteps extends \\tests\\codeception\\backend\\AcceptanceTester\r\n{\r\n    public function loginAsAdmin()\r\n    {\r\n        $I = $this;\r\n        $I->amOnPage('/admin/login');\r\n        $I->fillField('LoginForm[username]', 'y.awad');\r\n        $I->fillField('LoginForm[password]', '554927');\r\n        $I->click('login-button');\r\n    }\r\n}`"}}