cakephp simpletest to use phpundercontrol like phpunit

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

Post Reply
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

cakephp simpletest to use phpundercontrol like phpunit

Post by jmut »

Hi.
Currently we have a project that is using cakephp framework for one reason or another. As cakephp is integretaed with simpletest we have all our tests implemented like so. Lately I am reading on continuous integration and stuff and got stuck with phpundercontrol But seems it's more well integrated with phpunit.

Has anyone used it with simpletest or perhaps some easy simpletest to phpunit transition.

Any pointers are more than welcome.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: cakephp simpletest to use phpundercontrol like phpunit

Post by josh »

The biggest issue is the paramater orders for expected and actual are reversed,

assertEquals stays the same

in simpletest assertReference gets changed to assertSame for phpunit, any places you are using simpletests assert method assertSame needs to be changed to assertIdentical

Creating mock objects is different if you use constructor signatures, if you have your tests well factored it wont be as big of a pain tho
Post Reply