Drupal 8  8.0.2
DirectoryTest Class Reference
Inheritance diagram for DirectoryTest:

Public Member Functions

 testFileCheckLocalDirectoryHandling ()
 
 testFileCheckDirectoryHandling ()
 
 testFileCreateNewFilepath ()
 
 testFileDestination ()
 
 testFileDirectoryTemp ()
 
- Public Member Functions inherited from FileTestBase
 assertFilePermissions ($filepath, $expected_mode, $message=NULL)
 
 assertDirectoryPermissions ($directory, $expected_mode, $message=NULL)
 
 createDirectory ($path=NULL)
 
 createUri ($filepath=NULL, $contents=NULL, $scheme=NULL)
 

Additional Inherited Members

- Static Public Attributes inherited from FileTestBase
static $modules = array('system')
 
- Protected Member Functions inherited from FileTestBase
 setUp ()
 
- Protected Attributes inherited from FileTestBase
 $scheme
 
 $classname
 

Detailed Description

Tests operations dealing with directories.

File

Member Function Documentation

testFileCheckDirectoryHandling ( )

Test directory handling functions.

References FileTestBase\assertDirectoryPermissions(), drupal_chmod(), drupal_unlink(), FILE_CREATE_DIRECTORY, file_default_scheme(), file_ensure_htaccess(), FILE_MODIFY_PERMISSIONS, file_prepare_directory(), and FileStorage\htaccessLines().

Here is the call graph for this function:

testFileCheckLocalDirectoryHandling ( )

Test local directory handling functions.

References FileTestBase\assertDirectoryPermissions(), drupal_mkdir(), drupal_realpath(), and t().

Here is the call graph for this function:

testFileCreateNewFilepath ( )

This will take a directory and path, and find a valid filepath that is not taken by another file.

References file_create_filename(), and format_string().

Here is the call graph for this function:

testFileDestination ( )

This will test the filepath for a destination based on passed flags and whether or not the file exists.

If a file exists, file_destination($destination, $replace) will either return:

  • the existing filepath, if $replace is FILE_EXISTS_REPLACE
  • a new filepath if FILE_EXISTS_RENAME
  • an error (returning FALSE) if FILE_EXISTS_ERROR. If the file doesn't currently exist, then it will simply return the filepath.

References file_destination(), FILE_EXISTS_ERROR, FILE_EXISTS_RENAME, and FILE_EXISTS_REPLACE.

Here is the call graph for this function:

testFileDirectoryTemp ( )

Ensure that the file_directory_temp() function always returns a value.

References Drupal\config(), and file_directory_temp().

Here is the call graph for this function:


The documentation for this class was generated from the following file: