Hello, I am getting a problem that seems to have come up for others on these
forums, but I haven't seen any resolution for a setup that uses the new
Zend_Applicaton Bootstrapping procedure rather than the deprecated examples
from Pastebin, etc.  I am getting the error "Zend_Controller_Exception: No
default module defined for this application." I have the following setUp
method:


    public function setUp()
    {
        /** Zend_Application */
                require_once 'Zend/Application.php';
        $this->application = new Zend_Application(
            APPLICATION_ENV,
            APPLICATION_PATH . '/configs/application.ini'
        );
        $this->application->setAutoloaderNamespaces(array('Athena_'));
        $this->application->bootstrap();
        $this->bootstrap = $this->application->getBootstrap();

foreach($this->frontController->getControllerDirectory() as $key => $value)
{
        $this->log("$key => $value");
}

        parent::setUp();
    }
        
       protected $_logger;
        protected function getLogger() {
        if (null === $this->_logger) {
                        $this->_logger = 
$this->bootstrap->getResource('My_Application_Resource_Log');
        }
                return $this->_logger;
        }


I know the application is bootstrapping, because I am able to access the log
resource from the bootstrap in the getLogger function above.  Additionally,
the bolded log output shows me, among other things:

2009-12-09T04:24:24+00:00 INFO (6): default =>
C:\mypath\application/modules\default\controllers

This seems to suggest that the default module is, in fact, set.  Any ideas
as to why the exception is getting thrown?

Also, here is my test:

    public function testIndexAction()
    {
        $this->dispatch('/');
        $this->assertController('index');
        $this->assertAction('index');
    }

Thanks for your help in advance!

-- 
View this message in context: 
http://n4.nabble.com/Zend-Test-error-with-Zend-Application-Bootstrapping-tp955851p955851.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to