Unit Test Tutorial 1

From Joomla! Documentation

As of now the current SVN trunk fails unit testing.

Issue 1) the bootstrapper is not compatible with the current release of PHPUnit (3.6.10) but only to the outdated 3.4.11 release Issue 2) It should be noted that the phpunit/DbUtils package is also required. However, PHPUnit 3.4.11 is not compatible with the current DbUnit release (1.1.2) but only to the outdated 1.0.2 release, which has issues with required files itself. Issue 3) After installing PHPUnit 3.4.11 and DbUnit 1.0.2, and fixing the require() problems in DbUnit, unit testing fails at ./tests/unit/suite/libraries/joomla/database/JDatabaseQueryTest.php on line 7 where it tries to require_once JPATH_BASE.'/libraries/joomla/database/databasequery.php'. Issue 4) Same issue as (3) in JDatabaseQueryElementTest.php Issue 5) and counting... next it fails to require_once JPATH_BASE . '/libraries/joomla/filter/filterinput.php' and require_once JPATH_BASE . '/libraries/joomla/filter/filteroutput.php'

I stopped here as it seems the current PHPUnit tree is absolutely broken for 2.5.

(I also posted this on the BugSquad group)