@trigger_error('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',E_USER_DEPRECATED);
// Type 'core' only exists to simplify application-level logic; it always maps
// to the /core directory, whereas $name is ignored. It is only requested via
// \Drupal\Core\Extension\ExtensionList::getPath(). The file
// /core/core.info.yml does not exist, but is required since
// ExtensionList::getPath() returns the dirname() of the returned pathname.
@trigger_error('drupal_get_path() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead. See https://www.drupal.org/node/2940438',E_USER_DEPRECATED);
returndirname(drupal_get_filename($type,$name));
}
/**
* Translates a string to the current language or to a given language.
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead. See https://www.drupal.org/node/2940438',E_USER_DEPRECATED);
* Tests that drupal_get_filename() works correctly.
*
* @group Bootstrap
* @group legacy
*/
classGetFilenameTestextendsKernelTestBase{
/**
* {@inheritdoc}
*/
protectedstatic$modules=['system'];
/**
* Tests drupal_get_filename() deprecation.
*/
publicfunctiontestDrupalGetFilename():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->expectDeprecation('drupal_get_path() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead. See https://www.drupal.org/node/2940438');
$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(DRUPAL_MINIMUM_PHP,$composer_json['config']['platform']['php'],'The DRUPAL_MINIMUM_PHP constant should always be exactly the same as the config.platform.php in the root composer.json.');
$this->assertEquals(\Drupal::MINIMUM_PHP,$composer_json['config']['platform']['php'],'The \Drupal::MINIMUM_PHP constant should always be exactly the same as the config.platform.php in the root composer.json.');
$this->assertEquals($composer_core_json['require']['php'],'>='.$composer_json['config']['platform']['php'],'The config.platform.php configured version in the root composer.json file should always be exactly the same as the minimum php version configured in core/composer.json.');