class TestFileOwnership in Automatic Updates 8
Class TestFileOwnership.
Hierarchy
- class \Drupal\automatic_updates\ReadinessChecker\Filesystem implements ReadinessCheckerInterface uses StringTranslationTrait
- class \Drupal\automatic_updates\ReadinessChecker\FileOwnership
- class \Drupal\Tests\automatic_updates\Kernel\ReadinessChecker\TestFileOwnership
- class \Drupal\automatic_updates\ReadinessChecker\FileOwnership
Expanded class hierarchy of TestFileOwnership
File
- tests/
src/ Kernel/ ReadinessChecker/ FileOwnershipTest.php, line 45
Namespace
Drupal\Tests\automatic_updates\Kernel\ReadinessCheckerView source
class TestFileOwnership extends FileOwnership {
/**
* {@inheritdoc}
*/
protected function doCheck() {
$file_stream = vfsStream::setup('core', '755', [
'core.api.php' => 'contents',
]);
$file = $file_stream
->getChild('core.api.php');
$file
->chown(23)
->chgrp(23);
return $this
->ownerIsScriptUser($file
->url());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FileOwnership:: |
protected | function | Check if file is owned by the same user as which is running the script. | |
Filesystem:: |
protected | property | The root file path. | |
Filesystem:: |
protected | property | The vendor file path. | |
Filesystem:: |
protected | function | Determine if the root and vendor file system are the same logical disk. | 2 |
Filesystem:: |
protected | function | Get the root file path. | |
Filesystem:: |
protected | function | Get the vendor file path. | |
Filesystem:: |
public | function |
Run check. Overrides ReadinessCheckerInterface:: |
|
Filesystem:: |
public | function | Filesystem constructor. | 1 |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
TestFileOwnership:: |
protected | function |
Perform checks. Overrides FileOwnership:: |