
| Current Path : /var/www/html/rocksensor2/web/core/modules/views_ui/tests/src/Kernel/ |
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/rocksensor2/web/core/modules/views_ui/tests/src/Kernel/TruncateDeprecateTest.php |
<?php
declare(strict_types=1);
namespace Drupal\Tests\views_ui\Kernel;
use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
/**
* Tests the deprecation of views_ui_truncate() function.
*
* @group views_ui
*/
class TruncateDeprecateTest extends ViewsKernelTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = ['views', 'views_ui'];
/**
* Tests the deprecation of views_ui_truncate() replaced by Unicode::truncate.
*
* @group legacy
*/
public function testDeprecateViewsUiTruncate(): void {
$string = 'one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen';
$short_string = views_ui_truncate($string, 80);
$this->expectDeprecation('views_ui_truncate() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Component\Utility\Unicode::truncate(). See https://www.drupal.org/node/3408283');
}
}