On 01/28/2011 02:47 AM, Leander Damme wrote:
As far as I can tell, your error originates from
/var/www/unit-testing/tests/application/controllers/IndexControllerTest.php 
Line 3.
which is a require_once of 'Zend/Test/PHPUnit/ControllerTestCase.php'

So it does not have anything to do with require_once 
'controllers/ControllerTestCase.php';
Line 3 of IndexControllerTest.php is:

class IndexControllerTest extends ControllerTestCase

It has everything to do with ControllerTestCase.php

abstract class ControllerTestCase extends Zend_Test_PHPUnit_ControllerTestCase

I found out the problem though.

PHPunit 3.2 does not read the bootstrap file from XML. So the bootstrap.php file was not being executed. Hence the constants were not being defined. Hence the "paths" were indeed "missing".

PHPunit 3.4 works. I had to update PEAR via PEAR - not apt. PHPunit requires PEAR installer >= 1.8.1. Then install PHPunit via PEAR.

Now to write some tests.

Sorry for the noise.

Thanks for your help, Leander.

Simon

Reply via email to