PhpBackendTest.php

Same filename in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php
  3. 11.x core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php

Namespace

Drupal\KernelTests\Core\Cache

File

core/tests/Drupal/KernelTests/Core/Cache/PhpBackendTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\KernelTests\Core\Cache;

use Drupal\Component\Datetime\TimeInterface;
use Drupal\Core\Cache\PhpBackend;

/**
 * Unit test of the PHP cache backend using the generic cache unit test base.
 *
 * @group Cache
 */
class PhpBackendTest extends GenericCacheBackendUnitTestBase {
    
    /**
     * Creates a new instance of MemoryBackend.
     *
     * @return \Drupal\Core\Cache\CacheBackendInterface
     *   A new PhpBackend object.
     */
    protected function createCacheBackend($bin) {
        return new PhpBackend($bin, \Drupal::service('cache_tags.invalidator.checksum'), \Drupal::service(TimeInterface::class));
    }

}

Classes

Title Deprecated Summary
PhpBackendTest Unit test of the PHP cache backend using the generic cache unit test base.

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