Displaying error messages without the content of the current view.

2013-10-21 Thread Gabriel Lau
Hi folks, how can i display error messages without the content of the current view? For example: If a vendor file throws a PDOException, the error message is displayed inside my current view. First, the content of my current view is displayed (without any layout, just the content), then the err

Exception output issue

2014-03-08 Thread Gabriel Lau
Hello people, I realized recently that when an exception is triggered through a view (calling a nonexistent helper, for example), the error message along with the error layout (if customized) are displayed after the contents of the view in that the error is being generated (before the DOCTYPE).

Controller Integration Testing not catching exceptions in Cake 3.x

2015-09-01 Thread Gabriel Lau
Hi, I'm having problems with integration tests in my json API in moment of catch an exception thrown by the application. In my *UsersController*: request->allowMethod('get'); // ... throw new \Cake\Core\Exception\Exception('catch me'); // ... } }

How to load SQL views in Fixtures for unit tests in Cakephp 3?

2015-10-02 Thread Gabriel Lau
My application has some sql views to perform complex queries in the database and be better able to filter the results based on these values. One problem I encountered when running the unit tests is that Cake do not import sql views, just tables, breaking the application tests. *- How can I sol