Running PHP Zend Test in Eclipse

Can I run PHP Zend test cases (those that extend Zend_Test_PHPUnit_ControllerTestCase, etc.) through the Eclipse PDT?

I would like to be able to run them the same way you run JUnit tests in Eclipse, by right-clicking the test file and choosing Run as JUnit Test Case.

I would like to see a green or red bar instead of going to the command line :).

Thanks in advance.

+6
eclipse php unit-testing zend-framework zend-test
source share
4 answers

I could never get the SimpleTest Eclipse plugin for working with validations based on PHPUnit, although this is theoretically possible. You can get PHPUnit to work in the Eclipse IDE, but it is so that it simply dumps the output to the console. At the very least, you do not need to leave the IDE, although you do not get nice red / green reports. If someone can extend the damn SimpleTest plugin by including PHPUnit, I'd love to hear about it.

+1
source share

Another option is MakeGood "a continuous test runner to run unit tests on the Eclipse PDT"

+1
source share

Take a look at the SimpleTest plugin for Eclipse, it supports PHPUnit, although I canโ€™t check if it works or not:

http://www.simpletest.org/

You run the tests in the same way as JUnit through "Run as SimpleTest", and there is a result view similar to JUnit.

0
source share

You can use the PHPUnit component of the PTI Eclipse plugin: http://www.phpsrc.org/projects/pti-phpunit/wiki/

It will provide you with a test generator, easy ways to run tests and highlight code to see which test failed.

0
source share

All Articles