function StandardPerformanceTest::assertNoJavaScript
Same name in other branches
- 10 core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php \Drupal\Tests\standard\FunctionalJavascript\StandardPerformanceTest::assertNoJavaScript()
Passes if no JavaScript is found on the page.
@internal
Parameters
Drupal\Tests\PerformanceData $performance_data: A PerformanceData value object.
1 call to StandardPerformanceTest::assertNoJavaScript()
- StandardPerformanceTest::testAnonymous in core/
profiles/ standard/ tests/ src/ FunctionalJavascript/ StandardPerformanceTest.php - Tests performance for anonymous users.
File
-
core/
profiles/ standard/ tests/ src/ FunctionalJavascript/ StandardPerformanceTest.php, line 327
Class
- StandardPerformanceTest
- Tests the performance of basic functionality in the standard profile.
Namespace
Drupal\Tests\standard\FunctionalJavascriptCode
protected function assertNoJavaScript(PerformanceData $performance_data) : void {
// Ensure drupalSettings is not set.
$settings = $this->getDrupalSettings();
$this->assertEmpty($settings, 'drupalSettings is not set.');
$this->assertSession()
->responseNotMatches('/\\.js/');
$this->assertSame(0, $performance_data->getScriptCount());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.