PhpUnitWarningsTest.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\TestsFile
core/tests/Drupal/Tests/PhpUnitWarningsTest.phpView source
<?php
namespace Drupal\Tests;
/**
* @coversDefaultClass \Drupal\Tests\Traits\PhpUnitWarnings
* @group legacy
*/
class PhpUnitWarningsTest extends UnitTestCase {
/**
* Tests that selected PHPUnit warning is converted to deprecation.
*/
public function testAddWarning() {
$this
->expectDeprecation('Test warning for \\Drupal\\Tests\\PhpUnitWarningsTest::testAddWarning()');
$this
->addWarning('Test warning for \\Drupal\\Tests\\PhpUnitWarningsTest::testAddWarning()');
}
}
Classes
Name | Description |
---|---|
PhpUnitWarningsTest | @coversDefaultClass \Drupal\Tests\Traits\PhpUnitWarnings @group legacy |