MTimeProtectedFastFileStorageTest.php

Same filename and directory in other branches
  1. 11.x core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php
  2. 10 core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php
  3. 9 core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php
  4. 8.9.x core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php

Namespace

Drupal\Tests\Component\PhpStorage

File

core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\Component\PhpStorage;

use Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Medium;

/**
 * Tests the MTimeProtectedFastFileStorage implementation.
 */
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.
   *
   * @var bool[]
   */
  protected array $expected = [
    TRUE,
    FALSE,
  ];
  
  /**
   * The PHP storage class to test.
   *
   * @var class-string
   */
  protected $storageClass = 'Drupal\\Component\\PhpStorage\\MTimeProtectedFastFileStorage';

}

Classes

Title Deprecated Summary
MTimeProtectedFastFileStorageTest Tests the MTimeProtectedFastFileStorage implementation.

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