[fw-general] Testing of controller's action with redirect via Zend_Test

2009-01-22 Thread Tir

Hi! I'm trying to test my controller with redirect in one of its actions.
Redirect to index action of index controller was realized via gotoUrl()
method of Zend_Controller_Action_Helper_Redirector:
$this-_helper-redirector-gotoUrl('/'). On the web-server all works
ideally. But when i run test which tests this controller i receive error:
Zend_Controller_Action_Exception: Action error does not exist and was not
trapped in __call(). To all appearance after redirect in my action next
request dispatches to error action of error controller. But i can't
understand why this happens. Any ideas?
-- 
View this message in context: 
http://www.nabble.com/Testing-of-controller%27s-action-with-redirect-via-Zend_Test-tp21599509p21599509.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Test + setcookie() = error

2008-10-10 Thread Tir


Matthew Weier O'Phinney-3 wrote:
 
 Actually... we don't have a way in the Response object yet for setting
 cookies; if we had one, that would make testing easier. I've added a
 ticket for you to track this:
 
 http://framework.zend.com/issues/browse/ZF-4520
 
It's really good idea: add in the response object methods to manipulate with
cookies. But how i can test my code, in which i use the setcookie function,
with the Zend_Test now? I mean test my code and don't receive the Cannot
modify
header information - headers already sent by error :)
-- 
View this message in context: 
http://www.nabble.com/Zend_Test-%2B-setcookie%28%29-%3D-error-tp19834606p19917831.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Test + setcookie() = error

2008-10-08 Thread Tir

Hi, all!
In one of my plugins i set cookie in preDispatch method with the setcookie
function. And when i try to test my controllers with descendant of the
Zend_Test_PHPUnit_ControllerTestCase class i receive an error Cannot modify
header information - headers already sent by. I think it occures because i
set cookie with PHP native function, not with method of ZF classes. How can
i set cookies to have no error ocurred?
-- 
View this message in context: 
http://www.nabble.com/Zend_Test-%2B-setcookie%28%29-%3D-error-tp19834606p19834606.html
Sent from the Zend Framework mailing list archive at Nabble.com.