{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/7615","labels_url":"https://api.github.com/repos/laravel/framework/issues/7615/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/7615/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/7615/events","html_url":"https://github.com/laravel/framework/issues/7615","id":58988494,"number":7615,"title":"Service Provider makes invalid assumptions about Application class","user":{"login":"PatrickRose","id":1681612,"avatar_url":"https://avatars.githubusercontent.com/u/1681612?v=3","gravatar_id":"","url":"https://api.github.com/users/PatrickRose","html_url":"https://github.com/PatrickRose","followers_url":"https://api.github.com/users/PatrickRose/followers","following_url":"https://api.github.com/users/PatrickRose/following{/other_user}","gists_url":"https://api.github.com/users/PatrickRose/gists{/gist_id}","starred_url":"https://api.github.com/users/PatrickRose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PatrickRose/subscriptions","organizations_url":"https://api.github.com/users/PatrickRose/orgs","repos_url":"https://api.github.com/users/PatrickRose/repos","events_url":"https://api.github.com/users/PatrickRose/events{/privacy}","received_events_url":"https://api.github.com/users/PatrickRose/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-25T23:34:45Z","updated_at":"2015-02-26T13:20:46Z","closed_at":"2015-02-26T13:12:57Z","body":"I'm currently unit testing a service provider so I can support Laravel 4 and Laravel 5 with more confidence, but I'm unable to mock out an instance of the Application to test that the correct fields are added to the container because the base ServiceProvider uses `$app['config']` in several places.\r\n\r\nSince the Application interface doesn't implement the ArrayAccess, that is invalid in my test. Is there a reason that any instances could not be replaced with `$app->make()`? It makes the code messier but makes unit testing that things are bound correctly much easier."},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/76176525","html_url":"https://github.com/laravel/framework/issues/7615#issuecomment-76176525","issue_url":"https://api.github.com/repos/laravel/framework/issues/7615","id":76176525,"user":{"login":"crynobone","id":172966,"avatar_url":"https://avatars.githubusercontent.com/u/172966?v=3","gravatar_id":"","url":"https://api.github.com/users/crynobone","html_url":"https://github.com/crynobone","followers_url":"https://api.github.com/users/crynobone/followers","following_url":"https://api.github.com/users/crynobone/following{/other_user}","gists_url":"https://api.github.com/users/crynobone/gists{/gist_id}","starred_url":"https://api.github.com/users/crynobone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crynobone/subscriptions","organizations_url":"https://api.github.com/users/crynobone/orgs","repos_url":"https://api.github.com/users/crynobone/repos","events_url":"https://api.github.com/users/crynobone/events{/privacy}","received_events_url":"https://api.github.com/users/crynobone/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T13:20:46Z","updated_at":"2015-02-26T13:20:46Z","body":"`m::mock('\\Illuminate\\Contracts\\Foundation\\Application', '\\ArrayAccess');`\r\n\r\nhttps://github.com/orchestral/kernel/blob/master/tests/Http/RouteManagerTest.php#L21 as an example."}}