Page 1 of 1

SimpleTest annotations

Posted: Wed Dec 26, 2007 4:10 pm
by alex.barylski
Is this possible in SimpleTest? How?

I've searched Google, etc for a way to prefix test methods with 'should' instead of 'test' and have not found any way to accomplish this, so short of poking through the SimpleTest code...I figured I'd ask here as I thought this would be a popular topic but apparently not...according to Google anyways. :P

Posted: Wed Dec 26, 2007 4:41 pm
by Chris Corbyn
I'm curious if this is possible too. JUnit allows the use of Annotations to do things like this. In PHP it would be a little less readable however since there are no annotations although Reflection does allow Doc comments to be read in PHP5.

Posted: Wed Dec 26, 2007 5:42 pm
by alex.barylski
Chris Corbyn wrote:I'm curious if this is possible too. JUnit allows the use of Annotations to do things like this. In PHP it would be a little less readable however since there are no annotations although Reflection does allow Doc comments to be read in PHP5.
I had to Google annotations because you confused me with that last sentance...

All I am interested in doing (for now) is having 'should' prefix instead of 'test' which I figured would be a simple call to the SimpleTest class...but I can't find anything...so short of going into the source and finding where the unit tests are invoked and replacing 'test' with 'should' - I'm lost... :)

Posted: Wed Dec 26, 2007 5:44 pm
by Maugrim_The_Reaper
Some form of annotation support (I think maybe grouping though) was discussed a few weeks ago on the SimpleTest mailing list but the ST team have slightly larger fish to fry first I think (like migrating to Subversion and PHP5).

Posted: Wed Dec 26, 2007 8:09 pm
by alex.barylski
Slightly off topic but related to ST...

While reading the PHPUnit docs I encountered that code coverage analysis application...very neat...can I use something similar in SimpleTest? I assume it's a PHP extension?

Posted: Fri Dec 28, 2007 2:59 pm
by Maugrim_The_Reaper
I don't believe it applies yet - code coverage for PHPUnit is in any case run primarily by the xdebug extension. Adding support for that to SimpleTest would be a relatively simple task I'd think. Chance are SimpleTest will have Mutation Support in about a month also - something I'm working on in bits and pieces.

Posted: Fri Dec 28, 2007 9:03 pm
by alex.barylski
Maugrim_The_Reaper wrote:I don't believe it applies yet - code coverage for PHPUnit is in any case run primarily by the xdebug extension. Adding support for that to SimpleTest would be a relatively simple task I'd think. Chance are SimpleTest will have Mutation Support in about a month also - something I'm working on in bits and pieces.
And by mutation support, you mean???

Posted: Sat Dec 29, 2007 12:40 pm
by Weirdan