{"action":"created","issue":{"url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/71","labels_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/71/comments","events_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/71/events","html_url":"https://github.com/kenjis/ci-phpunit-test/issues/71","id":112373686,"number":71,"title":"LoadApplicationClass Order","user":{"login":"PhoenixFnX","id":993122,"avatar_url":"https://avatars.githubusercontent.com/u/993122?v=3","gravatar_id":"","url":"https://api.github.com/users/PhoenixFnX","html_url":"https://github.com/PhoenixFnX","followers_url":"https://api.github.com/users/PhoenixFnX/followers","following_url":"https://api.github.com/users/PhoenixFnX/following{/other_user}","gists_url":"https://api.github.com/users/PhoenixFnX/gists{/gist_id}","starred_url":"https://api.github.com/users/PhoenixFnX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhoenixFnX/subscriptions","organizations_url":"https://api.github.com/users/PhoenixFnX/orgs","repos_url":"https://api.github.com/users/PhoenixFnX/repos","events_url":"https://api.github.com/users/PhoenixFnX/events{/privacy}","received_events_url":"https://api.github.com/users/PhoenixFnX/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-20T13:52:40Z","updated_at":"2015-10-20T21:52:43Z","closed_at":null,"body":"Hi,\r\n\r\nI have an issue: I have a controller name which is used in a library I use. The CIPHPUNIT autoload feature loads libraries first to search for a class. I think Controller and models are more important than libraries which can be third party code.\r\n\r\nI resolved it putting libraries scope below the others in this file CIPHPUnitTestAutoloader.php:71\r\n```php\r\nprotected function loadApplicationClass($class)\r\n\t{\r\n\t\t$dirs = [\r\n\t\t\tAPPPATH.'controllers',\r\n\t\t\tAPPPATH.'models',\r\n\t\t\tAPPPATH.'libraries',\r\n\t\t];\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/comments/149713778","html_url":"https://github.com/kenjis/ci-phpunit-test/issues/71#issuecomment-149713778","issue_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/71","id":149713778,"user":{"login":"kenjis","id":87955,"avatar_url":"https://avatars.githubusercontent.com/u/87955?v=3","gravatar_id":"","url":"https://api.github.com/users/kenjis","html_url":"https://github.com/kenjis","followers_url":"https://api.github.com/users/kenjis/followers","following_url":"https://api.github.com/users/kenjis/following{/other_user}","gists_url":"https://api.github.com/users/kenjis/gists{/gist_id}","starred_url":"https://api.github.com/users/kenjis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenjis/subscriptions","organizations_url":"https://api.github.com/users/kenjis/orgs","repos_url":"https://api.github.com/users/kenjis/repos","events_url":"https://api.github.com/users/kenjis/events{/privacy}","received_events_url":"https://api.github.com/users/kenjis/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T21:52:43Z","updated_at":"2015-10-20T21:52:43Z","body":"In my opinion, models and libraries are more important than controllers. Libraries in CodeIgniter may be third party code, but may be *Domain Model*.\r\n\r\nSo I changed the order: https://github.com/kenjis/ci-phpunit-test/blob/master/application/tests/_ci_phpunit_test/CIPHPUnitTestAutoloader.php#L41\r\n\r\nBut now you can configure the search path:\r\nSee https://github.com/kenjis/ci-phpunit-test/blob/master/docs/HowToWriteTests.md#autoloader\r\n"}}