From af37c646b5bb7f9562bc2a5d4634811d3d3f109c Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 5 Aug 2021 07:31:49 +0200 Subject: [PATCH] Fix broken mock Signed-off-by: Alexander M. Turek --- .../Storage/Proxy/SessionHandlerProxyTest.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php index 1422eccfbc049..972a2745132e1 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php @@ -103,17 +103,21 @@ public function testRead() public function testWrite() { $this->mock->expects($this->once()) - ->method('write'); + ->method('write') + ->willReturn(true) + ; - $this->proxy->write('id', 'data'); + $this->assertTrue($this->proxy->write('id', 'data')); } public function testDestroy() { $this->mock->expects($this->once()) - ->method('destroy'); + ->method('destroy') + ->willReturn(true) + ; - $this->proxy->destroy('id'); + $this->assertTrue($this->proxy->destroy('id')); } public function testGc() @@ -149,7 +153,9 @@ public function testUpdateTimestamp() $proxy->updateTimestamp('id', 'data'); $this->mock->expects($this->once()) - ->method('write'); + ->method('write') + ->willReturn(true) + ; $this->proxy->updateTimestamp('id', 'data'); }