{"comment":{"created_at":"2011-10-13T19:26:07Z","body":"I don't totally get your problem but you can manually set the environment to `'test'` before running your tests in a `setUp()` method in your tests classes.\r\n\r\n    public function setUp(){\r\n         Environment::set('test');\r\n    }\r\n\r\n\r\nSee\r\nhttp://lithify.me/docs/lithium/core/Environment::set()\r\nhttp://lithify.me/docs/lithium/test/Unit::setUp()","updated_at":"2011-10-13T19:26:07Z","url":"https://api.github.com/repos/UnionOfRAD/lithium/issues/comments/2398978","id":2398978,"user":{"gravatar_id":"c74bdcd3fa7c3d3f23290f46430b1463","avatar_url":"https://secure.gravatar.com/avatar/c74bdcd3fa7c3d3f23290f46430b1463?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/mehlah","id":224928,"login":"mehlah"}},"action":"created","issue":{"number":160,"created_at":"2011-10-13T16:07:48Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I lost 2 days for found problem of configuration Adaptable for tests\r\n\r\nI Environment::set('development'); @ bootstrap/action.php\r\n\r\nCall stack for request http://pwi2.dev/test/app/tests/cases/models/QueuesTest\r\n\r\nhttp://pwi2.dev/test/app/tests/cases/models/QueuesTest (suspended)\t\r\n\tadapter(): /pwi2/libraries/lithium/core/Adaptable.php at line 296 [break]\r\n\tadapter(): /pwi2/libraries/lithium/core/Adaptable.php at line 100\t\r\n\tget(): /pwi2/libraries/lithium/data/Connections.php at line 170\t\r\n\t/pwi2/app/config/bootstrap/errors.php at line 45\t\r\n\t/pwi2/app/config/bootstrap.php at line 88\t\r\n\t/pwi2/app/webroot/index.php at line 21\t\r\n\r\n[break]\r\nprotected static function _config($name) {\r\n$env = Environment::get();\r\n\r\nmethod _config and $env return 'development' should be a 'test' !","comments":3,"title":"wrong env for test","updated_at":"2011-10-13T19:26:07Z","url":"https://api.github.com/repos/UnionOfRAD/lithium/issues/160","id":1901751,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"ebc48525201d5c5d608cc11ced4dc7b4","avatar_url":"https://secure.gravatar.com/avatar/ebc48525201d5c5d608cc11ced4dc7b4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/agborkowski","id":170557,"login":"agborkowski"},"html_url":"https://github.com/UnionOfRAD/lithium/issues/160","labels":[],"state":"open"},"legacy":{"issue_id":1901751,"comment_id":2398978}}