difference.
Otherwise if the test happens to be run on a second barrier, it could
falsely fail (like it did just now when codur said some hurtful things
about my code failing unit-tests where it really didn't ;)
Some of the other block tests seem to itermitantly fail for no appearent
reason (null comes back instead of the block)... I don't know why.
* per bug 26425
*/
function testBug26425BlockTimestampDefaultsToTime() {
-
- $this->assertEquals( $this->madeAt, $this->block->mTimestamp, "If no timestamp is specified, the block is recorded as time()");
+ // delta to stop one-off errors when things happen to go over a second mark.
+ $delta = abs( $this->madeAt - $this->block->mTimestamp );
+ $this->assertLessThan( 2, $delta, "If no timestamp is specified, the block is recorded as time()");
}