|
From: Jason S. <jsw...@ya...> - 2003-11-13 05:37:26
|
Thanks for getting back to me.
> > /**
> > *
> > * @package DataCache
> > * @subpackage tests
> > */
>
> Surprising. Do you find it useful to PHPDoc your test cases?
More like force of habit, enforced by the tools. I set up my text editor to
automatically stub them in when I paste in a class, function or var.
> You could create a separate assert method for this, such as...
>
> function assertNow($timing, $message = '%s') {
> $message = sprintf($message, 'Within one second of now');
> $this->assertTrue(1 >= abs($timing - mktime()), $message);
> }
That looks good. Where would you define it in a test suite that was able to
run each test file standalone? Seems like you would have to hack it into
simpletest itself to make it universally accessable, or is there a more
reasonable hook?
Regards,
Jason
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
|