To get the actual error, turn off the error handler and make the front
controller throw exceptions.
Zend_Controller_Front::getInstance()->setParam('noErrorHandler',
true)->throwExceptions(true);
   -- Mon


On Tue, Jan 13, 2009 at 12:46 AM, jasonswett <jason.sw...@gmail.com> wrote:

>
>
>
> Matthew Weier O'Phinney-3 wrote:
> >
> > -- jasonswett <jason.sw...@gmail.com> wrote
> > (on Monday, 12 January 2009, 08:20 AM -0800):
> >>
> >> I'm using ZF 1.6.0 and I'm trying to get
> >> Zend_Test_PHPUnit_ControllerTestCase
> >> to work. I've mostly gotten it, but when I try to call dispatch(), I get
> >> the
> >> following error:
> >>
> >> Zend_Controller_Dispatcher_Exception: Invalid controller specified
> >> (error)
> >>
> >> Here's what my code looks like:
> >>
> >> class UserControllerTest extends Zend_Test_PHPUnit_ControllerTestCase
> >> {
> >>     public function setUp()
> >>     {
> >>         $this->bootstrap = array($this, 'appBootstrap');
> >>         parent::setUp();
> >>     }
> >>
> >>     public function appBootstrap() {
> >>         $this->frontController->registerPlugin(new Initializer('test'));
> >>     }
> >>
> >>     public function testWhatever()
> >>     {
> >>         $this->dispatch('connector/index');
> >
> > Use a leading slash:
> >
> >     $this->dispatch('/connector/index');
> >
> > dispatch() is passing the argument as a URL to the request object, so it
> > should look like a URL (though it doesn't require the schema, hostname
> > and/or port).
> >
> >>     }
> >> }
> >>
> >> I guess when it says "Invalid controller specified (error)," it thinks
> >> that
> >> I'm trying to run a controller called "error." Even if my controller dir
> >> isn't set properly, why would it get the controller name wrong?
> >>
> >> Also, does anyone know where I can find some good, complete examples
> >> using
> >> Zend_Test_PHPUnit_ControllerTestCase?
> >>
> >> Thanks,
> >> Jason
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21417721.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >>
> >
> > --
> > Matthew Weier O'Phinney
> > Software Architect       | matt...@zend.com
> > Zend Framework           | http://framework.zend.com/
> >
> >
>
> Thanks for the reply. When I add a leading slash, I still get the exact
> same
> error, though.
> --
> View this message in context:
> http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21418302.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>

Reply via email to