function PhpUnitBridgeTest::testDeprecatedClass
Tests class-level deprecation.
File
- 
              core/
tests/ Drupal/ Tests/ Core/ Test/ PhpUnitBridgeTest.php, line 19  
Class
- PhpUnitBridgeTest
 - Test how unit tests interact with deprecation errors.
 
Namespace
Drupal\Tests\Core\TestCode
public function testDeprecatedClass() {
  $this->expectDeprecation('Drupal\\deprecation_test\\Deprecation\\FixtureDeprecatedClass is deprecated.');
  $deprecated = new FixtureDeprecatedClass();
  $this->assertEquals('test', $deprecated->testFunction());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.