I’ve done a little bit of reorganization of the VuFind 2.0 test suite:

 

http://vufind.git.sourceforge.net/git/gitweb.cgi?p=vufind/vufind;a=commitdiff;h=7d728c23111d465e97b8903e410e03f98a074d69

 

I’ve moved phpunit.xml and bootstrap.php up a level, out of unit-tests – this way, the configuration can be shared between unit and configuration tests.

 

I’ve moved the fixtures to the top level of the tests directory in case we want to share them between unit and integration tests.

 

I’ve adjusted phpunit.xml to include an integration suite, and I have moved the existing ResultFeedTest.php from unit tests to integration tests (since it relies on a live Solr index and does end-to-end testing through several layers).

 

I’ve changed the namespace on ResultFeedTest from VuFind\Test to VuFind\IntegrationTest to avoid conflicts if we build unit tests for the same component.  We should probably rename VuFind\Test to VuFind\UnitTest within the tests themselves for consistency, but I haven’t made this move yet pending feedback.

 

I’ve adjusted the Phing build.xml to run all of the tests.  We can easily add separate tasks to run just unit or just integration tests if we want to – I opted to run both suites at once since it will be useful in continuous integration to obtain a complete coverage report.

 

Let me know if you can think of a better way of doing any of these things – I wanted to start differentiating between unit and integration tests, but I’m not too attached to the details if you see room for improvement.

 

- Demian