Skip to content

Commit 4eaad2e

Browse files
committed
Remove read() it isn't needed.
1 parent a3ea31b commit 4eaad2e

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/Authenticator/SessionAuthenticator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public function persistIdentity(ServerRequestInterface $request, ResponseInterfa
8686
$sessionKey = $this->getConfig('sessionKey');
8787
$session = $request->getAttribute('session');
8888
if (!$session->check($sessionKey)) {
89-
$session->read();
9089
$session->renew();
9190
$session->write($sessionKey, $identity);
9291
}

tests/TestCase/Authenticator/SessionAuthenticatorTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,13 @@ public function testPersistIdentity()
168168
->expects($this->once())
169169
->method('renew');
170170

171-
$this->sessionMock
172-
->expects($this->once())
173-
->method('read');
174-
175171
$this->sessionMock
176172
->expects($this->once())
177173
->method('write')
178174
->with('Auth', $data);
179175

180176
$this->sessionMock
181-
->expects($this->at(4))
177+
->expects($this->at(3))
182178
->method('check')
183179
->with('Auth')
184180
->will($this->returnValue(true));

0 commit comments

Comments
 (0)