function WritableFileSystemValidatorTest::testWritable

Tests the file system permissions validator.

@dataProvider providerWritable

Parameters

int $root_permissions: The file permissions for the root folder.

int $webroot_permissions: The file permissions for the web root folder.

int $vendor_permissions: The file permissions for the vendor folder.

string $webroot_relative_directory: The web root path, relative to the project root, or an empty string if the web root and project root are the same.

\Drupal\package_manager\ValidationResult[] $expected_results: The expected validation results.

File

core/modules/package_manager/tests/src/Kernel/WritableFileSystemValidatorTest.php, line 131

Class

WritableFileSystemValidatorTest
Unit tests the file system permissions validator.

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function testWritable(int $root_permissions, int $webroot_permissions, int $vendor_permissions, string $webroot_relative_directory, array $expected_results) : void {
    $this->setUpPermissions($root_permissions, $webroot_permissions, $vendor_permissions, $webroot_relative_directory);
    $this->assertStatusCheckResults($expected_results);
    $this->assertResults($expected_results, PreCreateEvent::class);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.