
| Current Path : /var/www/html1/testsite/web/core/tests/Drupal/KernelTests/Core/Bootstrap/ |
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/Bootstrap/FormatStringTest.php |
<?php
namespace Drupal\KernelTests\Core\Bootstrap;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests deprecated behavior of format_string.
*
* @group Bootstrap
* @group legacy
*/
class FormatStringTest extends KernelTestBase {
/**
* Tests error triggering on format_string.
*
* @expectedDeprecation format_string() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Component\Render\FormattableMarkup instead. See https://www.drupal.org/node/2302363
*/
public function testFormatString() {
$markup = \format_string("Test", []);
$this->assertInstanceOf(FormattableMarkup::class, $markup);
}
}