@@ -18,20 +18,19 @@ class AjaxWaitTest extends WebDriverTestBase {
protected$defaultTheme='starterkit_theme';
/**
* Tests that an unnecessary wait triggers a deprecation error.
* Tests that an unnecessary wait triggers an error.
*/
publicfunctiontestUnnecessaryWait():void{
$this->drupalGet('user');
$this->expectDeprecation("Drupal\FunctionalJavascriptTests\JSWebAssert::assertExpectedAjaxRequest called unnecessarily in a test is deprecated in drupal:10.2.0 and will throw an exception in drupal:11.0.0. See https://www.drupal.org/node/3401201");
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage('Unable to complete AJAX request.');
$this->expectExceptionMessage('There are no AJAX requests to wait for.');
@trigger_error(sprintf('%s called unnecessarily in a test is deprecated in drupal:10.2.0 and will throw an exception in drupal:11.0.0. See https://www.drupal.org/node/3401201',__METHOD__),E_USER_DEPRECATED);
thrownew\RuntimeException('There are no AJAX requests to wait for.');
}
// Detect untracked AJAX requests. This will alert if the detection is
@trigger_error('The "chromeOptions" array key is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use "goog:chromeOptions instead. See https://www.drupal.org/node/3422624',E_USER_DEPRECATED);
$this->expectDeprecation('Pushing requests without a session onto the request_stack is deprecated in drupal:10.3.0 and an error will be thrown from drupal:11.0.0. See https://www.drupal.org/node/3337193');
@@ -377,17 +376,6 @@ protected function setUp(): void {
$this->addToAssertionCount(1);
}
/**
* {@inheritdoc}
*/
publicfunction__get(string$name){
if($name==='randomGenerator'){
@trigger_error('Accessing the randomGenerator property is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use getRandomGenerator() instead. See https://www.drupal.org/node/3358445',E_USER_DEPRECATED);
return$this->getRandomGenerator();
}
}
/**
* Sets up the root application path.
*/
@@ -447,16 +435,11 @@ protected function tearDown(): void {
if($this->container){
// Cleanup mock session started in DrupalKernel::preHandle().
@trigger_error('Pushing requests without a session onto the request_stack is deprecated in drupal:10.3.0 and an error will be thrown from drupal:11.0.0. See https://www.drupal.org/node/3337193',E_USER_DEPRECATED);