Please document AbstractHttpControllerTestCase::reset(true);

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Please document AbstractHttpControllerTestCase::reset(true);

Simon Walter
It's a very useful and necessary function. It would be nice to add a
line about this to the documentation.

One must call reset($keepPersistence = true) in order for multiple calls
to dispatch in one test function to work properly.

It looks like setUp() calls reset() and therefore unless you are making
multiple calls to dispatch() it won't affect you.

I suppose it's nothing more than dealing with $_GET and $_POST and the
eventmanager, but it would save some n00b like me hours of debugging.

Thanks,

Simon

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Please document AbstractHttpControllerTestCase::reset(true);

Frank Brückner
Hi Simon,
please open a new ticket on  
https://github.com/zendframework/zend-mvc/issues
Or create a pull request.
Thanks!


Kind regards,
Frank

Am 24.02.2016, 10:37 Uhr, schrieb Simon Walter <[hidden email]>:

> It's a very useful and necessary function. It would be nice to add a  
> line about this to the documentation.
>
> One must call reset($keepPersistence = true) in order for multiple calls  
> to dispatch in one test function to work properly.
>
> It looks like setUp() calls reset() and therefore unless you are making  
> multiple calls to dispatch() it won't affect you.
>
> I suppose it's nothing more than dealing with $_GET and $_POST and the  
> eventmanager, but it would save some n00b like me hours of debugging.
>
> Thanks,
>
> Simon

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Please document AbstractHttpControllerTestCase::reset(true);

Simon Walter
Pull request sent.

I am not sure if what I wrote is technically correct. I hope it's helpful.

Kind regards,

Simon

On 2016/02/24 19:45, Frank Brückner wrote:

> Hi Simon,
> please open a new ticket on
> https://github.com/zendframework/zend-mvc/issues
> Or create a pull request.
> Thanks!
>
>
> Kind regards,
> Frank
>
> Am 24.02.2016, 10:37 Uhr, schrieb Simon Walter <[hidden email]>:
>
>> It's a very useful and necessary function. It would be nice to add a
>> line about this to the documentation.
>>
>> One must call reset($keepPersistence = true) in order for multiple
>> calls to dispatch in one test function to work properly.
>>
>> It looks like setUp() calls reset() and therefore unless you are
>> making multiple calls to dispatch() it won't affect you.
>>
>> I suppose it's nothing more than dealing with $_GET and $_POST and
>> the eventmanager, but it would save some n00b like me hours of
>> debugging.
>>
>> Thanks,
>>
>> Simon
>


--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]