public function GetFilenameTest::testDrupalGetFilename in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php \Drupal\KernelTests\Core\Bootstrap\GetFilenameTest::testDrupalGetFilename()
Tests drupal_get_filename() deprecation.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Bootstrap/ GetFilenameTest.php, line 23
Class
- GetFilenameTest
- Tests that drupal_get_filename() works correctly.
Namespace
Drupal\KernelTests\Core\BootstrapCode
public function testDrupalGetFilename() : void {
$this
->expectDeprecation('drupal_get_filename() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\Core\\Extension\\ExtensionPathResolver::getPathname() instead. See https://www.drupal.org/node/2940438');
$this
->assertEquals('core/modules/system/system.info.yml', drupal_get_filename('module', 'system'));
}