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');
    }   
}

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.

Reply via email to