class MTimeProtectedFastFileStorageTest

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php \Drupal\Tests\Component\PhpStorage\MTimeProtectedFastFileStorageTest
  2. 8.9.x core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php \Drupal\Tests\Component\PhpStorage\MTimeProtectedFastFileStorageTest
  3. 11.x core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php \Drupal\Tests\Component\PhpStorage\MTimeProtectedFastFileStorageTest

Tests the MTimeProtectedFastFileStorage implementation.

@coversDefaultClass \Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage

@group Drupal @group PhpStorage

Hierarchy

Expanded class hierarchy of MTimeProtectedFastFileStorageTest

File

core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php, line 15

Namespace

Drupal\Tests\Component\PhpStorage
View source
class MTimeProtectedFastFileStorageTest extends MTimeProtectedFileStorageBase {
    
    /**
     * The expected test results for the security test.
     *
     * The first iteration does not change the directory mtime so this class will
     * include the hacked file on the first try but the second test will change
     * the directory mtime and so on the second try the file will not be included.
     */
    protected array $expected = [
        TRUE,
        FALSE,
    ];
    
    /**
     * The PHP storage class to test.
     */
    protected $storageClass = 'Drupal\\Component\\PhpStorage\\MTimeProtectedFastFileStorage';

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
MTimeProtectedFastFileStorageTest::$expected protected property The expected test results for the security test. Overrides MTimeProtectedFileStorageBase::$expected
MTimeProtectedFastFileStorageTest::$storageClass protected property The PHP storage class to test. Overrides MTimeProtectedFileStorageBase::$storageClass
MTimeProtectedFileStorageBase::$secret protected property The secret string to use for file creation.
MTimeProtectedFileStorageBase::$settings protected property Test settings to pass to storage instances.
MTimeProtectedFileStorageBase::setUp protected function Overrides PhpStorageTestBase::setUp
MTimeProtectedFileStorageBase::testCRUD public function Tests basic load/save/delete operations.
MTimeProtectedFileStorageBase::testSecurity public function Tests the security of the MTimeProtectedFileStorage implementation.
PhpStorageTestBase::$directory protected property A unique per test class directory path to test php storage.
PhpStorageTestBase::additionalAssertCRUD protected function Additional asserts to be run.
PhpStorageTestBase::assertCRUD public function Assert that a PHP storage's load/save/delete operations work.

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