public function PhpUnitBridgeIsolatedTest::testDeprecatedClass in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Test/PhpUnitBridgeIsolatedTest.php \Drupal\Tests\Core\Test\PhpUnitBridgeIsolatedTest::testDeprecatedClass()
File
- core/
tests/ Drupal/ Tests/ Core/ Test/ PhpUnitBridgeIsolatedTest.php, line 19
Class
- PhpUnitBridgeIsolatedTest
- Test how unit tests interact with deprecation errors in process isolation.
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());
}