
| Current Path : /var/www/html/rocksensor3/web/core/tests/Drupal/FunctionalTests/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/html/rocksensor3/web/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php |
<?php
declare(strict_types=1);
namespace Drupal\FunctionalTests\Core\Test;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
/**
* Tests Drupal's integration with Symfony PHPUnit Bridge.
*
* @group Test
* @group legacy
*/
class PhpUnitBridgeTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['deprecation_test'];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests deprecation message from deprecation_test_function().
*/
public function testSilencedError(): void {
$this->expectDeprecation('This is the deprecation message for deprecation_test_function().');
$this->assertEquals('known_return_value', deprecation_test_function());
}
/**
* Tests deprecation message from deprecated route.
*/
public function testErrorOnSiteUnderTest(): void {
$this->expectDeprecation('This is the deprecation message for deprecation_test_function().');
$this->drupalGet(Url::fromRoute('deprecation_test.route'));
}
}