You are here

public static function TestBase::filePreDeleteCallback in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/TestBase.php \Drupal\simpletest\TestBase::filePreDeleteCallback()

Ensures test files are deletable within file_unmanaged_delete_recursive().

Some tests chmod generated files to be read only. During TestBase::restoreEnvironment() and other cleanup operations, these files need to get deleted too.

File

core/modules/simpletest/src/TestBase.php, line 1558
Contains \Drupal\simpletest\TestBase.

Class

TestBase
Base class for Drupal tests.

Namespace

Drupal\simpletest

Code

public static function filePreDeleteCallback($path) {
  chmod($path, 0700);
}