
| Current Path : /var/www/html1/testsite/web/core/tests/Drupal/KernelTests/Core/Test/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/testsite/web/core/tests/Drupal/KernelTests/Core/Test/PhpUnitBridgeTest.php |
<?php
namespace Drupal\KernelTests\Core\Test;
use Drupal\KernelTests\KernelTestBase;
use Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass;
/**
* Test how kernel tests interact with deprecation errors.
*
* @group Test
* @group legacy
*/
class PhpUnitBridgeTest extends KernelTestBase {
public static $modules = ['deprecation_test'];
/**
* @expectedDeprecation Drupal\deprecation_test\Deprecation\FixtureDeprecatedClass is deprecated.
*/
public function testDeprecatedClass() {
$deprecated = new FixtureDeprecatedClass();
$this->assertEquals('test', $deprecated->testFunction());
}
/**
* @expectedDeprecation This is the deprecation message for deprecation_test_function().
*/
public function testDeprecatedFunction() {
$this->assertEquals('known_return_value', \deprecation_test_function());
}
}