CakePHP 2 Unit Test Mocking — Prevent assigning different Alias
Problem: Mock If you have tried Mocking models, you might have encountered some problems especially for models that have Associations. One of those problem is, when you mock a model, it assigns an alias. For example: model User will become Mock_User_b13d6ac9. That will cause…