Upgraded drupal core with security updates
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Cache / NullBackendTest.php
1 <?php
2
3 namespace Drupal\Tests\Core\Cache;
4
5 use Drupal\Core\Cache\NullBackend;
6 use Drupal\Tests\UnitTestCase;
7
8 /**
9  * Tests the cache NullBackend.
10  *
11  * @group Cache
12  */
13 class NullBackendTest extends UnitTestCase {
14
15   /**
16    * Tests that the NullBackend does not actually store variables.
17    */
18   public function testNullBackend() {
19     $null_cache = new NullBackend('test');
20
21     $key = $this->randomMachineName();
22     $value = $this->randomMachineName();
23
24     $null_cache->set($key, $value);
25     $this->assertFalse($null_cache->get($key));
26   }
27
28 }