TestMemoryBackend.php in Search API 8
File
tests/src/Kernel/Views/TestMemoryBackend.php
View source
<?php
namespace Drupal\Tests\search_api\Kernel\Views;
use Drupal\Core\Cache\MemoryBackend;
class TestMemoryBackend extends MemoryBackend {
protected $requestTime;
public function getRequestTime() {
return $this->requestTime ?: parent::getRequestTime();
}
public function setRequestTime($time) {
$this->requestTime = $time;
}
}
Classes
Name |
Description |
TestMemoryBackend |
A variant of the memory cache backend that allows to change the request time. |