3 namespace Drupal\Tests\Core\Cache;
5 use Drupal\Core\Cache\NullBackend;
6 use Drupal\Tests\UnitTestCase;
9 * Tests the cache NullBackend.
13 class NullBackendTest extends UnitTestCase {
16 * Tests that the NullBackend does not actually store variables.
18 public function testNullBackend() {
19 $null_cache = new NullBackend('test');
21 $key = $this->randomMachineName();
22 $value = $this->randomMachineName();
24 $null_cache->set($key, $value);
25 $this->assertFalse($null_cache->get($key));