By mondrake on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
9.1.x
Introduced in version:
9.1.0
Issue links:
Description:
Drupal 9.1 testing framework uses symfony/phpunit-bridge 5.1.
In that version, the use of @expectedDeprecation annotations in tests is deprecated itself, and tests should use the "ExpectDeprecationTrait::expectDeprecation()" method instead.
BEFORE
/**
* @group legacy
* @expectedDeprecation The event_dispatcher service should be passed to LayoutBuilder::__construct() instead of the layout_builder.tempstore_repository service since 9.1.0. This will be required in Drupal 10.0.0. See https://www.drupal.org/node/3152690
*/
public function testConstructorTempStoreDeprecation() {
$layout_temp_storage = $this->prophesize(LayoutTempstoreRepositoryInterface::class);
$element = new LayoutBuilder(
[],AFTER
/**
* @group legacy
*/
public function testConstructorTempStoreDeprecation() {
$this->expectDeprecation('The event_dispatcher service should be passed to LayoutBuilder::__construct() instead of the layout_builder.tempstore_repository service since 9.1.0. This will be required in Drupal 10.0.0. See https://www.drupal.org/node/3152690');
$layout_temp_storage = $this->prophesize(LayoutTempstoreRepositoryInterface::class);
$element = new LayoutBuilder(
[],Impacts:
Module developers
Comments
Using the
Oh, the irony!
Nomen omen
Nomen omen