On Tue, Sep 15, 2009 at 9:26 PM, dmitrybelyakov <shiftplatf...@gmail.com> wrote:
>
> Hello,
>
> First let me say that its my first experience with unit testing
> ZendFramework applications.
> What i'm trying to do is set up PHPUnit along with XDebug for code coverage
> reports.
> I wrote few very basic tests that run fine but as soon as Xdebug gets to my
> aplication folder
> to generate reports i start getting 'Cannot redeclare class...' errors like
> the one here:
>
> Generating code coverage report, this may take a moment.
> PHP Fatal error:  Cannot redeclare class Settings_IndexController in
> .../application/modules/settings/controllers/IndexController.php on line 20
>
> I'm a bit frustrated about this problem and don't know where to look for the
> cause of it as well
> as where to get any support. May be some of you guys are familiar with such
> problem or
> can direct me to where i can read more on the topic.
>
> Thanks a lot,
> Dmitry.

Looks like you are including/require'ing the controller twice. You
could try to "include_once", or use an autoloader (it's on demand
then). It's pretty hard to suggest something without a little code.

Till

Reply via email to