This post originated from an RSS feed registered with PHP Buzz
by Sebastian Bergmann.
Original Post: Comparing PHPUnit2 and SimpleTest
Feed Title: Sebastian Bergmann
Feed URL: http://sebastian-bergmann.de/
Feed Description: Geek by nature, PHP by choice.
First off, I have to say that I never really looked at SimpleTest. I hope I will have the time soon to do that. Next, let us take a look at each of their points:
"We can simply glob for files like *Test.php and give them to SimpleTest and it'll parse them, where as with PHPUnit2 you needed to give it an actual class."
Wrong, there are other ways to add tests to a test suite with PHPUnit2. This will even get easier with the new addTestFile($filename) method that has been added to the PHPUnit2_Framework_TestSuite class in PHPUnit 2.3.0.
"Mock Objects."
Yes, PHPUnit2 currently lacks support for Mock Objects. I recently started working on it and I hope to have it done in time for PHPUnit 2.3.0.
"There's no assertNotEquals() in PHPUnit2."
assertNotEquals() will be in PHPUnit 2.3.0.
"Only allowed to pass objects to assertSame() in PHPUnit2."
assertSame() asserts that two variables reference the same object. Why should assertSame() work on non-objects?
"The overhead of setting up the actual tests seems lighter with simpletest and we like to keep things light and simple."
Since I have not yet looked at SimpleTest I cannot comment on this point.
Maybe users of both PHPUnit2 and SimpleTest can add a comment to this entry and explaing why they prefer the one over the other.