Skip to content

Commit afbbfd5

Browse files
temenbxabbuh
authored andcommitted
Update phpunit_bridge.rst
$stopwatch->stop('event_name')->getDuration() returns time in milliseconds, so original test will fail in any way.. but not only because of "However, depending on the load of the server or the processes running on your local machine, the $duration could for example be 10.000023s instead of 10s."
1 parent 3a41ea8 commit afbbfd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/phpunit_bridge.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ If you have this kind of time-related tests::
167167
sleep(10);
168168
$duration = $stopwatch->stop('event_name')->getDuration();
169169

170-
$this->assertEquals(10, $duration);
170+
$this->assertEquals(10000, $duration);
171171
}
172172
}
173173

0 commit comments

Comments
 (0)