Mostly you should note that just as your application would bootstrap, so does your testing environment.

This means that you need to have an Zend_Application being setup, and it would bootstrap as normal. This would assume that your bootstrap class probably has a method to setup your autoloading too.

http://maff.ailoo.net/2009/04/set-up-a-zend-framework-application-using-zend_application-including-phpunit-setup/#add-unit-testing

Let me know if that link gets you going,
Ralph

Aycko wrote:
Push.


Aycko wrote:
All classes which are loaded with Zend_Application_Module_Autoloader in
module bootrap could not be found. The autoloaders are defined in
application bootstrap and module bootstrap ... this works great, but not
fpr testing.
Defining the Zend_Application_Module_Autoloaders in bootstrap file in
tests folder dont works. Including the missing miles via require_once
works, but this is not very comfortable.


funkyfly wrote:
Can you provide more detailed information about the fatal error?
--
Regards,
Vladas Diržys


On Fri, Sep 25, 2009 at 13:18, Aycko <aycko.maer...@gmx.de> wrote:



Aycko wrote:
Hello together,

i set up a basic environment for unit testing my Zend_Application.

A basic test looks something like this:

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

Calling phpunit in command line causes some php fatal errors. All
classes
which are loaded with Zend_Application_Module_Autoloader in module
bootrap
could not be found.

Are there any solution without setting up all requires manually?


Best regards
Aycko

Any ideas?
--
View this message in context:
http://www.nabble.com/Problem-with-autoloading-and-unit-testing-Zend_Application-tp25534200p25609668.html
Sent from the Zend Framework mailing list archive at Nabble.com.





Reply via email to