I have also tried $this->Users->Components->disable('Security'); On Nov 18, 1:55 pm, elitalon <elita...@gmail.com> wrote: > I am trying to test a CakePHP action that deals with a signup form > secured with the `Security` component. I have configured the component > in a UsersController like this: > > public $components = array( > 'Security' => array('unlockedFields' => > array('password_again')), > ); > > I can execute the action in a browser, but whenever I run the test > case it fails with the following message: > > "The request has been black-holed" > > I have tried to disable the validation inside the test case in several > ways: > > $this->Users->Security->enable = false; > $this->Users->Security->validatePost = false; > $this->Users->Security = null; // desperate measure :) > > // still fails > $this->testAction('/signup', array('data' => array(...), 'return' > => 'contents')); > > But the test insists in using the `Security` validation of `POST` > request. I am using CakePHP 2.0.3 and PHPUnit 3.6.3. > > By the way, I am not using the `UsersController` directly, but a > `TestUsersController` class that CakePHP baked for me (as a > replacement for `generate` method, I think). > > What's the right way of dealing with Security component in a test case?
-- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php