InstallerPerformanceTest.php in Drupal 10
File
core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php
View source
<?php
namespace Drupal\FunctionalTests\Installer;
use Drupal\Core\Routing\RoutingEvents;
use Drupal\Core\Test\PerformanceTestRecorder;
use Drupal\Tests\BrowserTestBase;
class InstallerPerformanceTest extends BrowserTestBase {
protected $defaultTheme = 'stark';
protected $profile = 'testing';
protected function prepareSettings() {
parent::prepareSettings();
PerformanceTestRecorder::registerService($this->siteDirectory . '/services.yml', FALSE);
}
public function testInstaller() {
$this
->assertSame(1, \Drupal::service('core.performance.test.recorder')
->getCount('event', RoutingEvents::FINISHED));
}
}