Skip to content

Commit af37c64

Browse files
committed
Fix broken mock
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 6d0e144 commit af37c64

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php

+11-5
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,21 @@ public function testRead()
103103
public function testWrite()
104104
{
105105
$this->mock->expects($this->once())
106-
->method('write');
106+
->method('write')
107+
->willReturn(true)
108+
;
107109

108-
$this->proxy->write('id', 'data');
110+
$this->assertTrue($this->proxy->write('id', 'data'));
109111
}
110112

111113
public function testDestroy()
112114
{
113115
$this->mock->expects($this->once())
114-
->method('destroy');
116+
->method('destroy')
117+
->willReturn(true)
118+
;
115119

116-
$this->proxy->destroy('id');
120+
$this->assertTrue($this->proxy->destroy('id'));
117121
}
118122

119123
public function testGc()
@@ -149,7 +153,9 @@ public function testUpdateTimestamp()
149153
$proxy->updateTimestamp('id', 'data');
150154

151155
$this->mock->expects($this->once())
152-
->method('write');
156+
->method('write')
157+
->willReturn(true)
158+
;
153159

154160
$this->proxy->updateTimestamp('id', 'data');
155161
}

0 commit comments

Comments
 (0)