You are here

public function JavascriptDeprecationTest::testJavascriptDeprecation in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php \Drupal\FunctionalJavascriptTests\JavascriptDeprecationTest::testJavascriptDeprecation()
  2. 9 core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php \Drupal\FunctionalJavascriptTests\JavascriptDeprecationTest::testJavascriptDeprecation()

Tests Javascript deprecation notices.

File

core/tests/Drupal/FunctionalJavascriptTests/JavascriptDeprecationTest.php, line 23

Class

JavascriptDeprecationTest
Tests Javascript deprecation notices.

Namespace

Drupal\FunctionalJavascriptTests

Code

public function testJavascriptDeprecation() {
  $this
    ->expectDeprecation('Javascript Deprecation: This function is deprecated for testing purposes.');
  $this
    ->expectDeprecation('Javascript Deprecation: This property is deprecated for testing purposes.');
  $this
    ->drupalGet('js_deprecation_test');

  // Ensure that deprecation message from previous page loads will be
  // detected.
  $this
    ->drupalGet('user');
}