Of course the result is null when the response only contains the redirect
headers.
You can read those headers - including the session value stored in your
test method.
See $this->headers['Location'] and CakeSession::read('message') or sth
mark
Am Samstag, 26. Juli 2014 11:45:45 UTC+2 schrieb walter:
>
> I test a controller action. I pass data to it via the POST method. After
> saving a data into DB I do a redirect to a main page where I display a
> message about of action result.
>
> I want to test whether this behavior and text of the message equal to
> expected, but I get a null instead of the $this->contents value.
>
> Yet, all data saved and messages displayed successfully via the browser.
>
> Below is my call of a testAction
>
> $res = $this->testAction('/ask', array_merge(array('return' => 'contents'),
> array('data' => $fields_data, 'method' => 'post')));
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.