8000 [PhpUnitBridge] fix Stopwatch API usage · symfony/symfony-docs@fead634 · GitHub
[go: up one dir, main page]

Skip to content

Commit fead634

Browse files
committed
[PhpUnitBridge] fix Stopwatch API usage
1 parent a5ea888 commit fead634

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/phpunit_bridge.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ If you have this kind of time-related tests::
141141
{
142142
$stopwatch = new Stopwatch();
143143

144-
$stopwatch->start();
144+
$stopwatch->start('event_name');
145145
sleep(10);
146-
$duration = $stopwatch->stop();
146+
$duration = $stopwatch->stop('event_name')->getDuration();
147147

148148
$this->assertEquals(10, $duration);
149149
}

0 commit comments

Comments
 (0)
0