cakephp/cakephp — pull request #1559 by markstory (2013-08-26 18:14:23+00:00)
Title: 3.0 extract config() methods into a trait

I've extracted the `config()`, `drop()` and `configured()` methods into a trait. I'm not sure it has the best name yet, but at least we can discuss it now. I decided to move those 3 methods as they are all related to the configuration management of a class.

I've removed the `Closure` factory function versions of config() as well. I don't have a solid use case for them right now, and would rather not have code included 'just in case'. If we can come up with some good use cases I'd be happy to re-include it.

I've not de-duplicated the tests yet, but I can see a few options for that:

* Make a unit test for the trait, and then assert that each class uses the trait.
* Make a trait of tests for the trait methods. Include the testing trait into each test suite. This feels like odd as it makes the tests harder to follow/understand.

Any ideas on how to de-duplicate the tests would be great.