MTimeProtectedFastFileStorageTest.php

Definition of Drupal\system\Tests\PhpStorage\MTimeProtectedFileStorageTest.

Namespace

Drupal\system\Tests\PhpStorage

File

drupal/core/modules/system/lib/Drupal/system/Tests/PhpStorage/MTimeProtectedFastFileStorageTest.php
View source
<?php

/**
 * @file
 * Definition of Drupal\system\Tests\PhpStorage\MTimeProtectedFileStorageTest.
 */
namespace Drupal\system\Tests\PhpStorage;


/**
 * Tests the directory mtime based PHP loader implementation.
 */
class MTimeProtectedFastFileStorageTest extends MTimeProtectedFileStorageTest {

  /**
   * 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 $expected = array(
    TRUE,
    FALSE,
  );

  /**
   * Test this class.
   */
  protected $storageClass = 'Drupal\\Component\\PhpStorage\\MTimeProtectedFastFileStorage';
  public static function getInfo() {
    return array(
      'name' => 'MTime protected fast file storage',
      'description' => 'Tests the MTimeProtectedFastFileStorage implementation.',
      'group' => 'PHP Storage',
    );
  }

}

Classes

Namesort descending Description
MTimeProtectedFastFileStorageTest Tests the directory mtime based PHP loader implementation.