PhpUnitWarningsTest.php

Same filename in other branches
  1. 9 core/tests/Drupal/Tests/PhpUnitWarningsTest.php
  2. 10 core/tests/Drupal/Tests/PhpUnitWarningsTest.php

Namespace

Drupal\Tests

File

core/tests/Drupal/Tests/PhpUnitWarningsTest.php

View source
<?php

declare (strict_types=1);
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

Title Deprecated Summary
PhpUnitWarningsTest @coversDefaultClass \Drupal\Tests\Traits\PhpUnitWarnings @group legacy

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