public function FormatStringTest::testFormatString in Drupal 8
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
File
- core/
tests/ Drupal/ KernelTests/ Core/ Bootstrap/ FormatStringTest.php, line 21
Class
- FormatStringTest
- Tests deprecated behavior of format_string.
Namespace
Drupal\KernelTests\Core\BootstrapCode
public function testFormatString() {
$markup = \format_string("Test", []);
$this
->assertInstanceOf(FormattableMarkup::class, $markup);
}