class LegacyStatusReportTest

Tests the status report element legacy methods.

@group Render @group legacy

Hierarchy

Expanded class hierarchy of LegacyStatusReportTest

File

core/tests/Drupal/KernelTests/Core/Render/Element/LegacyStatusReportTest.php, line 16

Namespace

Drupal\KernelTests\Core\Render\Element
View source
class LegacyStatusReportTest extends KernelTestBase {
  
  /**
   * Tests the getSeverities() method deprecation.
   */
  public function testGetSeveritiesDeprecation() : void {
    $this->expectDeprecation('Calling Drupal\\Core\\Render\\Element\\StatusReport::getSeverities() is deprecated in drupal:11.2.0 and is removed from in drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3410939');
    $severities = StatusReport::getSeverities();
    $this->assertIsArray($severities);
  }

}

Members

Title Sort descending Modifiers Object type Summary
ExpectDeprecationTrait::expectDeprecation public function Adds an expected deprecation.
ExpectDeprecationTrait::setUpErrorHandler public function Sets up the test error handler.
ExpectDeprecationTrait::tearDownErrorHandler public function Tears down the test error handler.
LegacyStatusReportTest::testGetSeveritiesDeprecation public function Tests the getSeverities() method deprecation.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.