class MTimeProtectedFastFileStorageTest

Tests the directory mtime based PHP loader implementation.

Hierarchy

Expanded class hierarchy of MTimeProtectedFastFileStorageTest

File

drupal/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFastFileStorageTest.php, line 13
Definition of Drupal\Tests\Component\PhpStorage\MTimeProtectedFileStorageTest.

Namespace

Drupal\Tests\Component\PhpStorage
View source
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',
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MTimeProtectedFastFileStorageTest::$expected protected property The expected test results for the security test. Overrides MTimeProtectedFileStorageTest::$expected
MTimeProtectedFastFileStorageTest::$storageClass protected property Test this class. Overrides MTimeProtectedFileStorageTest::$storageClass
MTimeProtectedFastFileStorageTest::getInfo public static function This method exists to support the simpletest UI runner. Overrides MTimeProtectedFileStorageTest::getInfo
MTimeProtectedFileStorageTest::setUp function Overrides \Drupal\Tests\UnitTestCase::setUp() Overrides PhpStorageTestBase::setUp
MTimeProtectedFileStorageTest::testCRUD function Tests basic load/save/delete operations.
MTimeProtectedFileStorageTest::testSecurity function Tests the security of the MTimeProtectedFileStorage implementation.
PhpStorageTestBase::$storageFactory protected property The storage factory object.
PhpStorageTestBase::assertCRUD public function Assert that a PHP storage controller's load/save/delete operations work.
UnitTestCase::getConfigFactoryStub public function Returns a stub config factory that behaves according to the passed in array.
UnitTestCase::getConfigStorageStub public function Returns a stub config storage that returns the supplied configuration.
UnitTestCase::randomName public static function Generates a random string containing letters and numbers.