
| Current Path : /var/www/html/ift/web/core/tests/Drupal/Tests/Core/Cache/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/ift/web/core/tests/Drupal/Tests/Core/Cache/NullBackendTest.php |
<?php
namespace Drupal\Tests\Core\Cache;
use Drupal\Core\Cache\NullBackend;
use Drupal\Tests\UnitTestCase;
/**
* Tests the cache NullBackend.
*
* @group Cache
*/
class NullBackendTest extends UnitTestCase {
/**
* Tests that the NullBackend does not actually store variables.
*/
public function testNullBackend() {
$null_cache = new NullBackend('test');
$key = $this->randomMachineName();
$value = $this->randomMachineName();
$null_cache->set($key, $value);
$this->assertFalse($null_cache->get($key));
}
}