init() loads from the cache which can autoload additional classes. For
example the FileEngine adapter loads Inflector. Loading additional
classes causes the file_map cache to be re-written on each request when
using FileEngine. This results in degraded performance when using
FileEngine.
Fixes#3947
When using multiple groups on a cache config, clearing was not working
properly. Clearing un-used cache configs also failed when the
directories did not exist.
Fixes#3930
Add setter method as changing ComponentCollection's constructor now is
not possible. This fixes issues where components that rely on
Collection->getController() in their constructor can work properly.
Fixes#3946
As recommended by the Cookbook:
http://book.cakephp.org/2.0/en/development/testing.html#testing-controllers
> When testing actions that contain redirect() and other code following the redirect it is generally a good idea to return when redirecting. The reason for this, is that redirect() is mocked in testing, and does not exit like normal. And instead of your code exiting, it will continue to run code following the redirect.
Added missing block reset test through assign().
Also made some minor cleanup in ViewTests.php. Mostly docblocks (params, returns) but also some unused variables.
Even though there was some code in place to prevent results in random
order from PostgreSQL we were still experiencing this with Jenkins
and Travis.
This commit removes the old code that handled this. From now on this
will be handled differently. Every test model will order by its
primary key. You can disable this by changing the order property
of the model to `null`: `$testModel->order = null`.
If a sort field whitelist is used we should trust its data and also
trust that the developer wanted what they asked for. This solves issues
where it was impossible to sort on synthetic columns added in custom
find types.
Fixes#3919
Make URL's not include the base path when storing them in the session.
This makes future redirection simpler. When URL's are an array use
Router::url() on them.
Fixes#3916
Revert most of the changes done to fix#3897 originally and try
a different strategy of solving the base path issues and not breaking
apps running in a subdirectory.
Fixes#3916