Last modified: 2010-11-12 12:54:07 UTC
While we've started on parser tests, and the Unicode normalization class has its
own test suite, there's still a lot of code with no automated, objective tests.
It would be nice to have a set of unit tests, perhaps using the PHPUnit/PHPUnit2
package (it's in PEAR) to test various functions and classes. This would also
encourage refactoring code in less global-dependent ways.
Created attachment 2263 [details]
Fix breakage in unit tests
It looks like Brion started on some tests but they
since became out of date. Here is a patch that makes
them work again.
To summarize, I removed the Latin-1 encoding tests
and support for MySQL v3, removed references to a
renamed profiling include file, modified
SearchMySQL4Test to use a new results interface,
and modified the database tests to create a
connection, which is now required required even
for simple operations like the addslashes()
With the patch all 40 tests pass, at least for me.
I'm using PHPUnit 1.3.2.
Created attachment 2264 [details]
Take 2 - don't die horribly if LocalTestSettings.php is not set up
Marking this bug resolved since we now have PHPUnit tests. Although the current coverage is far from being complete ...