You are here

protected function SitesDirectoryHardeningTest::settingsFile in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php \Drupal\Tests\system\Functional\System\SitesDirectoryHardeningTest::settingsFile()
  2. 9 core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php \Drupal\Tests\system\Functional\System\SitesDirectoryHardeningTest::settingsFile()

Returns the path to settings.php.

Parameters

string $site_path: The sites subdirectory path.

Return value

string The path to settings.php.

3 calls to SitesDirectoryHardeningTest::settingsFile()
SitesDirectoryHardeningTest::makeWritable in core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php
Makes the given path and settings file writable.
SitesDirectoryHardeningTest::testSitesDirectoryHardening in core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php
Tests the default behavior to restrict directory permissions is enforced.
SitesDirectoryHardeningTest::testSitesDirectoryHardeningConfig in core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php
Tests writable files remain writable when directory hardening is disabled.

File

core/modules/system/tests/src/Functional/System/SitesDirectoryHardeningTest.php, line 119

Class

SitesDirectoryHardeningTest
Tests Drupal permissions hardening of /sites subdirectories.

Namespace

Drupal\Tests\system\Functional\System

Code

protected function settingsFile($site_path) {
  $settings_file = $site_path . '/settings.php';
  return $settings_file;
}