8000 Improve unit test · symfony/symfony@657f020 · GitHub
[go: up one dir, main page]

Skip to content

Commit 657f020

Browse files
BrokenSourceCodeBrokenSourceCode
BrokenSourceCode
authored and
BrokenSourceCode
committed
Improve unit test
1 parent c11f8d9 commit 657f020

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,21 @@ public function testUpdateTimestamp()
163163
}
164164

165165
/**
166-
* https://github.com/symfony/symfony/pull/47130.
166+
* @dataProvider provideNativeSessionStorageHandler
167+
* @see https://github.com/symfony/symfony/pull/47130.
167168
*/
168-
public function testNativeSessionStorageSaveHandlerNameWithStrictSessionHandler()
169+
public function testNativeSessionStorageSaveHandlerName($handler)
169170
{
170-
$storage = new NativeSessionStorage([], new StrictSessionHandler(new \SessionHandler()));
171-
$this->assertEquals('files', $storage->getSaveHandler()->getSaveHandlerName());
171+
$this->assertEquals('files', (new NativeSessionStorage([], $handler))->getSaveHandler()->getSaveHandlerName());
172+
}
173+
174+
public function provideNativeSessionStorageHandler()
175+
{
176+
return [
177+
[new \SessionHandler()],
178+
[new StrictSessionHandler(new \SessionHandler())],
179+
[new SessionHandlerProxy(new StrictSessionHandler(new \SessionHandler()))]
180+
];
172181
}
173182
}
174183

0 commit comments

Comments
 (0)
0