diff --git a/src/TwigComponent/tests/Unit/DataCollector/TwigComponentDataCollectorTest.php b/src/TwigComponent/tests/Unit/DataCollector/TwigComponentDataCollectorTest.php index d9f818fa9f3..82fde7c8b22 100644 --- a/src/TwigComponent/tests/Unit/DataCollector/TwigComponentDataCollectorTest.php +++ b/src/TwigComponent/tests/Unit/DataCollector/TwigComponentDataCollectorTest.php @@ -74,6 +74,8 @@ public function testLateCollectWithCollectedData(bool $collectComponents): void $mounted = new MountedComponent('foo', new \stdClass(), new ComponentAttributes([], new EscaperRuntime())); $eventA = new PreRenderEvent($mounted, new ComponentMetadata(['key' => 'foo', 'template' => 'bar']), []); $logger->onPreRender($eventA); + // without it, both events often get the same microtime() and the render time is 0.0 + usleep(1); $eventB = new PostRenderEvent($mounted); $logger->onPostRender($eventB);