1
votes

My PHPUnit test environment is set to run against a ZF project. and all runs pretty well from one place. But when I move all project files (thru git clone) to another place, phpunit runs, but returns "OK (0 tests, 0 assertions)", While indeed there are couple of tests.

The same process worked well on 2 different locations, until I manually downgrade phpunit from 3.6.5 to 3.4.15 (which seems unavoidable for ZF projects). Not sure what's going wrong? OR if there is any execution log from phpunit I can check with?

my phpunit.xml

<phpunit bootstrap="./application/bootstrap.php" colors="true">
  <testsuites>
    <testsuite name="myTests">
        <directory>./</directory>
    </testsuite>
  </testsuites>

    <filter>
        <whitelist>
            <directory suffix=".php">../application/</directory>
            <exclude>
                <directory suffix=".phtml">../application/</directory>
                <file>../application/Bootstrap.php</file>
                <file>../application/controllers/ErrorController.php</file>
            </exclude>
        </whitelist>
    </filter>

</phpunit>

comes out:

PHPUnit 3.4.15 by Sebastian Bergmann.

Time: 0 seconds, Memory: 9.50Mb

OK (0 tests, 0 assertions)


where expexted:

PHPUnit 3.4.15 by Sebastian Bergmann.

.....

Time: 0 seconds, Memory: 30.75Mb

OK (5 tests, 11 assertions)

1

1 Answers

1
votes

You want to downgrade to 3.5.15 not 3.4.15 and just for good measure add suffix="Test.php" to your directory tag.

One of the two should do the trick