MockPerformanceMonitor
Playwright\Performance\Monitor\MockPerformanceMonitor
Mock implementation of PerformanceMonitorInterface for testing.
$ composer require playwright-php/performance
Methods
setCoreWebVitals()
voidSet the Core Web Vitals that will be returned by collectCoreWebVitals().
function setCoreWebVitals(CoreWebVitals $vitals): void
setResourceMetrics()
voidSet the resource metrics that will be returned by collectResourceMetrics().
function setResourceMetrics(array $resources): void
getNavigatedUrls()
arrayGet the list of URLs that were navigated to.
function getNavigatedUrls(): array
navigate()
voidfunction navigate(string $url): void
collectCoreWebVitals()
CoreWebVitalsfunction collectCoreWebVitals(): CoreWebVitals
collectResourceMetrics()
arrayfunction collectResourceMetrics(): array