Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / http-foundation / Tests / Session / Storage / Proxy / SessionHandlerProxyTest.php
index 682825356a7246a329f25fda230fa960f061d184..0b48250e01010e6f1f507c8276649c4699dc8dba 100644 (file)
@@ -121,4 +121,37 @@ class SessionHandlerProxyTest extends TestCase
 
         $this->proxy->gc(86400);
     }
+
+    /**
+     * @requires PHPUnit 5.1
+     */
+    public function testValidateId()
+    {
+        $mock = $this->getMockBuilder(array('SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'))->getMock();
+        $mock->expects($this->once())
+            ->method('validateId');
+
+        $proxy = new SessionHandlerProxy($mock);
+        $proxy->validateId('id');
+
+        $this->assertTrue($this->proxy->validateId('id'));
+    }
+
+    /**
+     * @requires PHPUnit 5.1
+     */
+    public function testUpdateTimestamp()
+    {
+        $mock = $this->getMockBuilder(array('SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'))->getMock();
+        $mock->expects($this->once())
+            ->method('updateTimestamp');
+
+        $proxy = new SessionHandlerProxy($mock);
+        $proxy->updateTimestamp('id', 'data');
+
+        $this->mock->expects($this->once())
+            ->method('write');
+
+        $this->proxy->updateTimestamp('id', 'data');
+    }
 }