.../Tests/Core/Cache/InconsistentBackendTest.php | 70 ---------------------- 1 file changed, 70 deletions(-) diff --git a/core/tests/Drupal/Tests/Core/Cache/InconsistentBackendTest.php b/core/tests/Drupal/Tests/Core/Cache/InconsistentBackendTest.php deleted file mode 100644 index cc55cf4..0000000 --- a/core/tests/Drupal/Tests/Core/Cache/InconsistentBackendTest.php +++ /dev/null @@ -1,70 +0,0 @@ - '', - 'description' => '', - 'group' => 'Cache' - ); - } - - public function setUp() { - $this->consistent_cache = new MemoryBackend("foo"); - $this->inconsistent_cache = new MemoryBackend("foo"); - $this->bin = "somebin"; - } - - public function testGetFromInconsistentCache() { - $state = $this->getMock("Drupal\Core\KeyValueStore\StateInterface"); - $state->expects($this->once()) - ->method("get") - ->will($this->returnValue(1234)); - - $inconsistent_backend = new InconsistentBackend( - $this->consistent_cache, - $this->inconsistent_cache, - $this->bin, - $state - ); - - $this->consistent_cache->set("foo", "baz"); - $inconsistent_backend->set("foo", "bar"); - $this->assertEquals("bar", $inconsistent_backend->get("foo")->data); - } - - public function testFallThroughToConsistentCache() { - $state = $this->getMock("Drupal\Core\KeyValueStore\StateInterface"); - $state->expects($this->once()) - ->method("get") - ->will($this->returnValue(time() + 99999)); - - $inconsistent_cache = $this->getMock("Drupal\Core\Cache\MemoryBackend", - array("set"), array("foo")); - $inconsistent_cache->expects($this->exactly(2)) - ->method("set"); - - $inconsistent_backend = new InconsistentBackend( - $this->consistent_cache, - $inconsistent_cache, - $this->bin, - $state - ); - - $inconsistent_cache->set("foo", "bar"); - $this->consistent_cache->set("foo", "baz"); - $this->assertEquals("baz", $inconsistent_backend->get("foo")->data); - } - -}